Package xbird.util.io

Examples of xbird.util.io.FastByteArrayOutputStream.clear()


        } catch (Throwable e) {
            LOG.fatal(e);
            throw new IllegalStateException("failed encoding", e);
        }
        final byte[] buf = bufOut.toByteArray();
        bufOut.clear();
        final int buflen = buf.length;
        if(LOG.isDebugEnabled()) {
            LOG.debug("encoded sequence size: " + buflen);
        }
        out.writeInt(buflen);
View Full Code Here


            final XQEventDecoder decoder = _decoder;
            decoder.redirectTo(objectOut);
            decoder.close();
            objectOut.flush();
            final byte[] buf = bufOut.toByteArray();
            bufOut.clear();

            // Because input of decoder fully read, this section required for re-object serialization, etc.
            if(_reaccessable) {
                final FastByteArrayInputStream inputBuf = new FastByteArrayInputStream(buf);
                final ObjectInputStream objectInput = new ObjectInputStream(inputBuf);
View Full Code Here

            final XQEventDecoder decoder = _decoder;
            decoder.redirectTo(objectOut);
            decoder.close();
            objectOut.flush();
            final byte[] buf = bufOut.toByteArray();
            bufOut.clear();

            // Because input of decoder fully read, this section required for re-object serialization, etc.
            if(_reaccessable) {
                final FastByteArrayInputStream inputBuf = new FastByteArrayInputStream(buf);
                final ObjectInputStream objectInput = new ObjectInputStream(inputBuf);
View Full Code Here

            throw new IllegalStateException("failed encoding", e);
        } finally {
            objOut.flush();
        }
        final byte[] buf = bufOut.toByteArray();
        bufOut.clear();
        final int buflen = buf.length;
        if(LOG.isDebugEnabled()) {
            LOG.debug("encoded sequence size: " + buflen);
        }
        out.writeInt(buflen);
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.