Examples of toByteArray()


Examples of com.sun.corba.ee.impl.encoding.CDROutputStream.toByteArray()

  boolean stateful = false;
  CompoundSecMechList list = new CompoundSecMechList(
      stateful, mechList);
  CompoundSecMechListHelper.write(out, list);
  byte[] buf = out.toByteArray();
  org.omg.IOP.TaggedComponent tc = new org.omg.IOP.TaggedComponent(
      TAG_CSI_SEC_MECH_LIST.value, buf ) ;
  return tc;
    }
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.EncapsOutputStream.toByteArray()

    {
        EncapsOutputStream os =
            sun.corba.OutputStreamFactory.newEncapsOutputStream((ORB)(s.orb()), gv);
        os.putEndian() ;
        writeData( os ) ;
        byte[] data = os.toByteArray() ;

        s.write_long(getId());
        s.write_long(data.length);
        s.write_octet_array(data, 0, data.length);
    }
View Full Code Here

Examples of com.sun.jna.platform.win32.Guid.GUID.toByteArray()

        (byte) 0x00, (byte) 0xC0, (byte) 0x4F, (byte) 0xB9,
        (byte) 0x51, (byte) 0xED };

    // test loading via static method
    GUID targetGuid = GUID.fromBinary(sourceGuidBArr);
    byte[] targetGuidBArr = targetGuid.toByteArray();

    for (int i = 0; i < sourceGuidBArr.length; i++) {
      assertEquals(targetGuidBArr[i], sourceGuidBArr[i]);
    }
  }
View Full Code Here

Examples of com.sun.xml.bind.v2.util.ByteArrayOutputStreamEx.toByteArray()

        ByteArrayOutputStreamEx baos = null;
        try {
            baos = new ByteArrayOutputStreamEx();
            is = dh.getDataSource().getInputStream();
            baos.readFrom(is);
            data = baos.toByteArray();
            len = data.length;
            baos.close();
            is.close();
        } catch (IOException ioe) {
            logger.log(Level.SEVERE, "could not get the inputstream from the data handler", ioe);
View Full Code Here

Examples of com.sun.xml.internal.messaging.saaj.util.ByteOutputStream.toByteArray()

     *      Use {@link ByteOutputStream} and {@link ByteOutputStream#write(InputStream)}.
     */
    public static byte[] getBytes(InputStream is) throws IOException {
        ByteOutputStream bos = new ByteOutputStream();
        bos.write(is);
        return bos.toByteArray();
    }
}
View Full Code Here

Examples of com.sun.xml.internal.ws.util.ByteArrayBuffer.toByteArray()

                try {
                    baf.write(part.readOnce());
                } catch(IOException ioe) {
                    throw new WebServiceException(ioe);
                }
                buf = baf.toByteArray();
            }
            return buf;
        }

        public DataHandler asDataHandler() {
View Full Code Here

Examples of com.sun.xml.messaging.saaj.util.ByteOutputStream.toByteArray()

     *      Use {@link ByteOutputStream} and {@link ByteOutputStream#write(InputStream)}.
     */
    public static byte[] getBytes(InputStream is) throws IOException {
        ByteOutputStream bos = new ByteOutputStream();
        bos.write(is);
        return bos.toByteArray();
    }
}
View Full Code Here

Examples of com.sun.xml.ws.util.ByteArrayBuffer.toByteArray()

                try {
                    baf.write(part.readOnce());
                } catch(IOException ioe) {
                    throw new WebServiceException(ioe);
                }
                buf = baf.toByteArray();
            }
            return buf;
        }

        public DataHandler asDataHandler() {
View Full Code Here

Examples of com.trolltech.qt.core.QByteArray.toByteArray()

//    ByteArrayInputStream is = new ByteArrayInputStream(html);
        logger.log(logger.HIGH, "Starting JTidy check");
        logger.log(logger.EXTREME, "Start of JTidy Input");
        logger.log(logger.EXTREME, newContent);
        logger.log(logger.EXTREME, "End Of JTidy Input");
    ByteArrayInputStream is = new ByteArrayInputStream(unicode.toByteArray());
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        tidy.setInputEncoding("UTF-8");
    tidy.parse(is, os);
    String tidyContent = os.toString();
    if (tidyListener.errorFound) {
View Full Code Here

Examples of com.twitter.data.proto.tutorial.AddressBookProtos.AddressBook.toByteArray()

  @Test
  public void testProtoToPig() throws IOException {
    AddressBook abProto = Fixtures.buildAddressBookProto();

    Tuple abProtoTuple = tf_.newTuple(new DataByteArray(abProto.toByteArray()));

    ProtobufBytesToTuple abProtoToPig =
        new ProtobufBytesToTuple(AddressBook.class.getCanonicalName());
    Tuple abTuple = abProtoToPig.exec(abProtoTuple);
    assertEquals("{(Elephant Bird,123,elephant@bird.com,{(415-999-9999,HOME),(415-666-6666,MOBILE),(415-333-3333,WORK)}),(Elephant Bird,123,elephant@bird.com,{(415-999-9999,HOME),(415-666-6666,MOBILE),(415-333-3333,WORK)})},",
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.