@Override public void write(byte[] buf, int off, int len) throws TTransportException { writeBuffer.write(buf, off, len); }
/** * * @param underlying Transport that real reads and writes will go through to. * @param initialBufferCapacity The initial size of the read and write buffers. * In practice, it's not critical to set this unless you know in advance that * your messages are going to be very large. (You can pass * TFramedTransportWithReusableBuffer.DEFAULT_BUF_CAPACITY if you're only * using this constructor because you want to set the maxLength.) * @param maxLength The max frame size you are willing to read. You can use * this parameter to limit how much memory can be allocated. */ public TFastFramedTransport(TTransport underlying, int initialBufferCapacity, int maxLength) { this.underlying = underlying; this.maxLength = maxLength; writeBuffer = new AutoExpandingBufferWriteTransport(initialBufferCapacity, 1.5); readBuffer = new AutoExpandingBufferReadTransport(initialBufferCapacity, 1.5); }
/** * * @param underlying Transport that real reads and writes will go through to. * @param initialBufferCapacity The initial size of the read and write buffers. * In practice, it's not critical to set this unless you know in advance that * your messages are going to be very large. (You can pass * TFramedTransportWithReusableBuffer.DEFAULT_BUF_CAPACITY if you're only * using this constructor because you want to set the maxLength.) * @param maxLength The max frame size you are willing to read. You can use * this parameter to limit how much memory can be allocated. */ public TFastFramedTransport(TTransport underlying, int initialBufferCapacity, int maxLength) { this.underlying = underlying; this.maxLength = maxLength; writeBuffer = new AutoExpandingBufferWriteTransport(initialBufferCapacity, 1.5); readBuffer = new AutoExpandingBufferReadTransport(initialBufferCapacity, 1.5); }
@Override public void write(byte[] buf, int off, int len) throws TTransportException { writeBuffer.write(buf, off, len); }