@Test public void testRelaseBufferOnClose() { Buffer b = mock(Buffer.class); Xdr xdr = new Xdr(b); xdr.close(); verify(b, times(1)).tryDispose(); }
public void close() { _buffer.tryDispose(); }
Xdr implements XdrDecodingStream, XdrEncodingStream, AutoCloseable { public void close() { _buffer.tryDispose(); } }
Xdr implements XdrDecodingStream, XdrEncodingStream, AutoCloseable { public void close() { _buffer.tryDispose(); } Xdr(int size);  Xdr(byte[] bytes);  Xdr(Buffer body); }
Xdr implements XdrDecodingStream, XdrEncodingStream, AutoCloseable { public void close() { _buffer.tryDispose(); } Xdr(int size);  Xdr(byte[] bytes);  Xdr(Buffer body); @Override void beginDecoding(); @Override void endDecoding(); @Override void beginEncoding(); @Override void endEncoding(); boolean hasMoreData(); @Override int xdrDecodeInt(); @Override int[] xdrDecodeIntVector(); @Override int[] xdrDecodeIntFixedVector(int length); @Override long[] xdrDecodeLongVector(); @Override long[] xdrDecodeLongFixedVector(int length); @Override float xdrDecodeFloat(); @Override double xdrDecodeDouble(); @Override double[] xdrDecodeDoubleVector(); @Override double[] xdrDecodeDoubleFixedVector(int length); @Override float[] xdrDecodeFloatVector(); @Override float[] xdrDecodeFloatFixedVector(int length); @Override void xdrDecodeOpaque(byte[] buf, int offset, int len); void xdrDecodeOpaque(byte[] buf,  int len); @Override byte[] xdrDecodeOpaque(int len); @Override byte [] xdrDecodeDynamicOpaque(); @Override String xdrDecodeString(); @Override boolean xdrDecodeBoolean(); @Override long xdrDecodeLong(); @Override ByteBuffer xdrDecodeByteBuffer(); @Override byte[] xdrDecodeByteVector(); @Override byte[] xdrDecodeByteFixedVector(int length); @Override byte xdrDecodeByte(); @Override short xdrDecodeShort(); @Override short[] xdrDecodeShortVector(); @Override short[] xdrDecodeShortFixedVector(int length); @Override void xdrEncodeInt(int value); Buffer asBuffer(); @Override void xdrEncodeIntVector(int[] values); @Override void xdrEncodeIntFixedVector(int[] value, int length); @Override void xdrEncodeLongVector(long[] values); @Override void xdrEncodeLongFixedVector(long[] value, int length); @Override void xdrEncodeFloat(float value); @Override void xdrEncodeDouble(double value); @Override void xdrEncodeFloatVector(float[] value); @Override void xdrEncodeFloatFixedVector(float[] value, int length); @Override void xdrEncodeDoubleVector(double[] value); @Override void xdrEncodeDoubleFixedVector(double[] value, int length); @Override void xdrEncodeString(String string); @Override void xdrEncodeOpaque(byte[] bytes, int offset, int len); @Override void xdrEncodeOpaque(byte[] bytes, int len); @Override void xdrEncodeDynamicOpaque(byte [] opaque); @Override void xdrEncodeBoolean(boolean bool); @Override void xdrEncodeLong(long value); @Override void xdrEncodeByteBuffer(ByteBuffer buf); @Override void xdrEncodeByteVector(byte[] value); @Override void xdrEncodeByteFixedVector(byte[] value, int length); @Override void xdrEncodeByte(byte value); @Override void xdrEncodeShort(short value); @Override void xdrEncodeShortVector(short[] value); @Override void xdrEncodeShortFixedVector(short[] value, int length); byte[] getBytes(); void close(); }
Xdr implements XdrDecodingStream, XdrEncodingStream, AutoCloseable { public void close() { _buffer.tryDispose(); } Xdr(int size);  Xdr(byte[] bytes);  Xdr(Buffer body); @Override void beginDecoding(); @Override void endDecoding(); @Override void beginEncoding(); @Override void endEncoding(); boolean hasMoreData(); @Override int xdrDecodeInt(); @Override int[] xdrDecodeIntVector(); @Override int[] xdrDecodeIntFixedVector(int length); @Override long[] xdrDecodeLongVector(); @Override long[] xdrDecodeLongFixedVector(int length); @Override float xdrDecodeFloat(); @Override double xdrDecodeDouble(); @Override double[] xdrDecodeDoubleVector(); @Override double[] xdrDecodeDoubleFixedVector(int length); @Override float[] xdrDecodeFloatVector(); @Override float[] xdrDecodeFloatFixedVector(int length); @Override void xdrDecodeOpaque(byte[] buf, int offset, int len); void xdrDecodeOpaque(byte[] buf,  int len); @Override byte[] xdrDecodeOpaque(int len); @Override byte [] xdrDecodeDynamicOpaque(); @Override String xdrDecodeString(); @Override boolean xdrDecodeBoolean(); @Override long xdrDecodeLong(); @Override ByteBuffer xdrDecodeByteBuffer(); @Override byte[] xdrDecodeByteVector(); @Override byte[] xdrDecodeByteFixedVector(int length); @Override byte xdrDecodeByte(); @Override short xdrDecodeShort(); @Override short[] xdrDecodeShortVector(); @Override short[] xdrDecodeShortFixedVector(int length); @Override void xdrEncodeInt(int value); Buffer asBuffer(); @Override void xdrEncodeIntVector(int[] values); @Override void xdrEncodeIntFixedVector(int[] value, int length); @Override void xdrEncodeLongVector(long[] values); @Override void xdrEncodeLongFixedVector(long[] value, int length); @Override void xdrEncodeFloat(float value); @Override void xdrEncodeDouble(double value); @Override void xdrEncodeFloatVector(float[] value); @Override void xdrEncodeFloatFixedVector(float[] value, int length); @Override void xdrEncodeDoubleVector(double[] value); @Override void xdrEncodeDoubleFixedVector(double[] value, int length); @Override void xdrEncodeString(String string); @Override void xdrEncodeOpaque(byte[] bytes, int offset, int len); @Override void xdrEncodeOpaque(byte[] bytes, int len); @Override void xdrEncodeDynamicOpaque(byte [] opaque); @Override void xdrEncodeBoolean(boolean bool); @Override void xdrEncodeLong(long value); @Override void xdrEncodeByteBuffer(ByteBuffer buf); @Override void xdrEncodeByteVector(byte[] value); @Override void xdrEncodeByteFixedVector(byte[] value, int length); @Override void xdrEncodeByte(byte value); @Override void xdrEncodeShort(short value); @Override void xdrEncodeShortVector(short[] value); @Override void xdrEncodeShortFixedVector(short[] value, int length); byte[] getBytes(); void close(); final static int MAX_XDR_SIZE; final static int INITIAL_XDR_SIZE; }