/** * {@inheritDoc} */ @Override public ByteBuffer readDirectBinary() throws TException { if (this.useDirectBuffers && this.nonBlockingTransport != null) { int length = readVarInt32(); if (length < 0) { throw new TProtocolException(TProtocolException.NEGATIVE_SIZE, "Negative length: " + length); } return ThriftUtils.readByteBuffer(this.nonBlockingTransport, length); } else { return super.readBinary(); } }