Examples of toByteArray()


Examples of com.knowgate.jcifs.ntlmssp.Type2Message.toByteArray()

        if (msg != null && msg.startsWith("NTLM ")) {
            byte[] src = Base64Decoder.decodeToBytes(msg.substring(5));
            if (src[8] == 1) {
                Type1Message type1 = new Type1Message(src);
                Type2Message type2 = new Type2Message(type1, challenge, null);
                msg = Base64Encoder.encode(type2.toByteArray());
                resp.setHeader( "WWW-Authenticate", "NTLM " + msg );
            } else if (src[8] == 3) {
                Type3Message type3 = new Type3Message(src);
                byte[] lmResponse = type3.getLMResponse();
                if (lmResponse == null) lmResponse = new byte[0];
View Full Code Here

Examples of com.knowgate.jcifs.ntlmssp.Type3Message.toByteArray()

            if (response != HTTP_UNAUTHORIZED && response != HTTP_PROXY_AUTH) {
                return;
            }
            Type3Message type3 = (Type3Message) attemptNegotiation(response);
            if (type3 == null) return;
            connection.setRequestProperty(authProperty, method + ' ' + Base64Encoder.encode(type3.toByteArray()));
            connection.connect(); // send type 3
            response = parseResponseCode();
            if (response != HTTP_UNAUTHORIZED && response != HTTP_PROXY_AUTH) {
                return;
            }
View Full Code Here

Examples of com.liferay.faces.bridge.lifecycle.DelayedResponseOutputStream.toByteArray()

      }
    }
    else if (incongruousAction == IncongruousAction.WRITE_RESPONSE_OUTPUT_STREAM) {
      DelayedResponseOutputStream delayedResponseOutputStream = (DelayedResponseOutputStream)
        getResponseOutputStream();
      byte[] delayedOutputByteArray = delayedResponseOutputStream.toByteArray();
      int length = 0;

      if (delayedOutputByteArray != null) {
        length = delayedOutputByteArray.length;
      }
View Full Code Here

Examples of com.lowagie.text.pdf.ByteBuffer.toByteArray()

                    colorspace.add(new PdfNumber(len / 3 - 1));
                    ByteBuffer colortable = new ByteBuffer();
                    while ((len--) > 0) {
                        colortable.append_i(is.read());
                    }
                    colorspace.add(new PdfString(colorTable = colortable.toByteArray()));
                    additional.put(PdfName.COLORSPACE, colorspace);
                }
                else {
                    Utilities.skip(is, len);
                }
View Full Code Here

Examples of com.massivecraft.mcore.xlib.bson.io.BasicOutputBuffer.toByteArray()

    public byte[] encode( BSONObject o ){
        BasicOutputBuffer buf = new BasicOutputBuffer();
        set( buf );
        putObject( o );
        done();
        return buf.toByteArray();
    }

    public void set( OutputBuffer out ){
        if ( _buf != null )
            throw new IllegalStateException( "in the middle of something" );
View Full Code Here

Examples of com.maverick.util.ByteArrayWriter.toByteArray()

  public void launchResource(int resourceId) { 
    try {
      ByteArrayWriter baw = new ByteArrayWriter();
      baw.writeInt(resourceId);
      Request request = new Request(SETUP_AND_LAUNCH_WEB_FORWARD, baw.toByteArray());
      if (agent.getConnection().sendRequest(request, true) && request.getRequestData()!=null) {
        ByteArrayReader bar = new ByteArrayReader(request.getRequestData());
        String uri = bar.readString();
        agent.getGUI().openBrowser(uri);
        // #ifdef DEBUG
View Full Code Here

Examples of com.nimbusds.jose.jwk.OctetSequenceKey.toByteArray()

    assertEquals(JWEAlgorithm.DIR, jweObject.getHeader().getAlgorithm());
    assertEquals(EncryptionMethod.A128GCM, jweObject.getHeader().getEncryptionMethod());
    assertEquals("77c7e2b8-6e13-45cf-8672-617b5b45243a", jweObject.getHeader().getKeyID());

    JWEDecrypter decrypter = new DirectDecrypter(jwk.toByteArray());

    jweObject.decrypt(decrypter);

    assertEquals(JWEObject.State.DECRYPTED, jweObject.getState());
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.OMemoryOutputStream.toByteArray()

    } catch (IOException e) {
      throw new OSerializationException("Error while marshalling OCommandRequestTextAbstract impl", e);
    }

    return buffer.toByteArray();
  }

  @Override
  public String toString() {
    return getClass().getSimpleName() + " [text=" + text + "]";
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.OMemoryStream.toByteArray()

      final OMemoryStream memoryOutputStream = new OMemoryStream();
      final GZIPOutputStream gzipOutputStream = new GZIPOutputStream(memoryOutputStream, 16384); // 16KB
      try {
        gzipOutputStream.write(content, offset, length);
        gzipOutputStream.finish();
        result = memoryOutputStream.toByteArray();
      } finally {
        gzipOutputStream.close();
      }

      return result;
View Full Code Here

Examples of com.peterhi.runtime.BitStream.toByteArray()

      }

      assertEquals(Byte.SIZE * 60, bs.available());
      assertEquals(60, bs.bytes());
     
      byte[] data = bs.toByteArray();
      DataInputStream dis = new DataInputStream(new ByteArrayInputStream(data));
     
      for (Map.Entry<BigInteger, Integer> entry : numbers.entrySet()) {
        BigInteger number = entry.getKey();
        Integer size = entry.getValue();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.