/** * Create a TMemoryBuffer with an initial buffer size of <i>size</i>. The * internal buffer will grow as necessary to accommodate the size of the data * being written to it. */ public TMemoryBuffer(int size) { arr_ = new TByteArrayOutputStream(size); }
/** * Create a TMemoryBuffer with an initial buffer size of <i>size</i>. The * internal buffer will grow as necessary to accommodate the size of the data * being written to it. */ public TMemoryBuffer(int size) { arr_ = new TByteArrayOutputStream(size); }
public FrameBuffer(final TNonblockingTransport trans, final SelectionKey selectionKey, final AbstractSelectThread selectThread) { trans_ = trans; selectionKey_ = selectionKey; selectThread_ = selectThread; buffer_ = ByteBuffer.allocate(4); frameTrans_ = new TMemoryInputTransport(); response_ = new TByteArrayOutputStream(); inTrans_ = inputTransportFactory_.getTransport(frameTrans_); outTrans_ = outputTransportFactory_.getTransport(new TIOStreamTransport(response_)); inProt_ = inputProtocolFactory_.getProtocol(inTrans_); outProt_ = outputProtocolFactory_.getProtocol(outTrans_); if (eventHandler_ != null) { context_ = eventHandler_.createContext(inProt_, outProt_); } else { context_ = null; } }
public FrameBuffer(final TNonblockingTransport trans, final SelectionKey selectionKey, final AbstractSelectThread selectThread) { trans_ = trans; selectionKey_ = selectionKey; selectThread_ = selectThread; buffer_ = ByteBuffer.allocate(4); frameTrans_ = new TMemoryInputTransport(); response_ = new TByteArrayOutputStream(); inTrans_ = inputTransportFactory_.getTransport(frameTrans_); outTrans_ = outputTransportFactory_.getTransport(new TIOStreamTransport(response_)); inProt_ = inputProtocolFactory_.getProtocol(inTrans_); outProt_ = outputProtocolFactory_.getProtocol(outTrans_); if (eventHandler_ != null) { context_ = eventHandler_.createContext(inProt_, outProt_); } else { context_ = null; } }
TByteArrayOutputStream arr = new TByteArrayOutputStream(DEF_STRING_SIZE); if (!skipContext) { context_.read();
TByteArrayOutputStream arr = new TByteArrayOutputStream(DEF_STRING_SIZE); if (!skipContext) { context_.read();