Examples of BsonDataOutput


Examples of org.infinispan.schematic.internal.io.BsonDataOutput

     * @param stream the output stream; may not be null
     * @throws IOException if there was a problem reading from the stream
     */
    public void write( Object object,
                       OutputStream stream ) throws IOException {
        BsonDataOutput buffer = new BsonDataOutput();
        write(null, object, buffer);
        buffer.writeTo(stream);
    }
View Full Code Here

Examples of org.infinispan.schematic.internal.io.BsonDataOutput

     * @param object the BSON object or BSON value; may not be null
     * @return the bytes
     * @throws IOException if there was a problem reading from the stream
     */
    public byte[] write( Object object ) throws IOException {
        BsonDataOutput buffer = new BsonDataOutput();
        write(null, object, buffer);
        ByteArrayOutputStream stream = new ByteArrayOutputStream(buffer.size());
        buffer.writeTo(stream);
        return stream.toByteArray();
    }
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.