Package org.teiid.core.util

Examples of org.teiid.core.util.AccessibleByteArrayOutputStream


        this.estimatedLength = estimatedLength;
    }
   
    @Override
    final protected void writeObjectOverride(Object obj) throws IOException {
        AccessibleByteArrayOutputStream baos = new AccessibleByteArrayOutputStream(estimatedLength);
        CompactObjectOutputStream oout = new CompactObjectOutputStream(baos);
        oout.writeObject(obj);
        ExternalizeUtil.writeCollection(oout, oout.getReferences());
        oout.flush();
        oout.close();
       
        out.writeInt(baos.getCount()); //includes the lob references
        out.write(baos.getBuffer(), 0, baos.getCount());
        byte[] chunk = new byte[(1 << 16) - 1];
        for (InputStream is : oout.getStreams()) {
          while (true) {
            int bytes = is.read(chunk);
            out.writeShort(Math.max(0, bytes));
View Full Code Here

TOP

Related Classes of org.teiid.core.util.AccessibleByteArrayOutputStream

Copyright © 2018 www.massapicom. 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.