Examples of toByteArray()


Examples of com.hazelcast.nio.BufferObjectDataOutput.toByteArray()

            }
            final BufferObjectDataOutput out = serializationService.pop();
            final byte[] binary;
            try {
                decompress(compressedBinary, out);
                binary = out.toByteArray();
            } finally {
                serializationService.push(out);
            }
            final ClassDefinitionImpl cd = new ClassDefinitionImpl();
            cd.readData(serializationService.createObjectDataInput(binary));
View Full Code Here

Examples of com.humaorie.dollar.ArrayWrapper.ByteArrayWrapper.toByteArray()

    @Test
    public void unboxByteArray() {
        Byte[] boxed = new Byte[]{42, 43, 44};
        ByteArrayWrapper arrayWrapper = new ByteArrayWrapper(boxed);
        Assert.assertArrayEquals(new byte[]{42, 43, 44}, arrayWrapper.toByteArray());
    }

    @Test
    public void unboxByteArrayToCharArray() {
        Byte[] boxed = new Byte[] { 'f', 'o', 'o' };
View Full Code Here

Examples of com.humaorie.dollar.ArrayWrapper.CharArrayWrapper.toByteArray()

    @Test
    public void unboxCharacterArrayToByteArray() {
        Character[] boxed = new Character[] { 'f', 'o', 'o' };
        CharArrayWrapper arrayWrapper = new CharArrayWrapper(boxed);
        Assert.assertArrayEquals(new byte[] { 'f', 'o', 'o' },
                arrayWrapper.toByteArray());
    }

    @Test
    public void unboxCharacterArrayToIntArray() {
        Character[] boxed = new Character[]{'f', 'o', 'o'};
View Full Code Here

Examples of com.ibm.commons.util.io.ByteStreamCache.toByteArray()

      if(object!=null) {
        ByteStreamCache bs = new ByteStreamCache(1024);
        ObjectOutputStream os = new ObjectOutputStream(bs.getOutputStream());
        try {
          os.writeObject(object);
          return bs.toByteArray();
        } finally {
          os.close();
        }
      }
      return null;
View Full Code Here

Examples of com.ibm.icu.text.CollationKey.toByteArray()

    return sb;
  }
  private static byte[] getSortByteArray (String term)
  {
    CollationKey colKey = col.getCollationKey(term);
    return colKey.toByteArray();
    //RawCollationKey rawKey = col.getRawCollationKey(term, null);
    //byte[] byt2= rawKey.releaseBytes();
   }
 
  /*
 
View Full Code Here

Examples of com.ibm.jvm.util.ByteArrayOutputStream.toByteArray()

    }

    private ResponseCtx sendHttpPost(RequestCtx requestCtx) {
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        requestCtx.encode(bout, new Indenter(0), true);
        byte[] byteArray = bout.toByteArray();
        byte[] msgDigest = getDigestBytes(byteArray);

        if (msgDigest != null) {
            ResponseCtx responseCtx = DigestMap.get().get(new String(msgDigest));
            if (responseCtx != null) {
View Full Code Here

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

  public static String convertToHex(byte[] bytes) {
      ByteBuffer buf = new ByteBuffer();
      for (byte b : bytes) {
          buf.appendHex(b);
      }
      return PdfEncodings.convertToString(buf.toByteArray(), null).toUpperCase();
  }
}
View Full Code Here

Examples of com.jacob.com.SafeArray.toByteArray()

    SafeArray bba = new SafeArray(Variant.VariantByte, 4);
    System.out.println("elem size:" + bba.getElemSize());
    byte bback[] = new byte[] { 0x1, 0x2, 0x3, 0x4 };
    printArray(bback);
    bba.fromByteArray(bback);
    bback = bba.toByteArray();
    printArray(bback);

    byte bb4[] = new byte[4];
    bba.getBytes(0, 4, bb4, 0);
    printArray(bb4);
View Full Code Here

Examples of com.jd.glowworm.asm.ClassWriter.toByteArray()

        _init(cw, new Context(className, config, beanInfo, 3));
        _createInstance(cw, new Context(className, config, beanInfo, 3));
        _deserialze(cw, new Context(className, config, beanInfo, 4));

        byte[] code = cw.toByteArray();

        /*org.apache.commons.io.IOUtils.write(code, new java.io.FileOutputStream(
          "d:/"+ className + ".class"));*/

        Class<?> exampleClass = classLoader.defineClassPublic(className, code, 0, code.length);
View Full Code Here

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

        }
        Type1Message type1 = (Type1Message) attemptNegotiation(response);
        if (type1 == null) return; // no NTLM
        int attempt = 0;
        while (attempt < MAX_REDIRECTS) {
            connection.setRequestProperty(authProperty, method + ' ' + Base64Encoder.encode(type1.toByteArray()));
            connection.connect(); // send type 1
            response = parseResponseCode();
            if (response != HTTP_UNAUTHORIZED && response != HTTP_PROXY_AUTH) {
                return;
            }
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.