@Test public void read_int() throws Exception { direct.putInt(17).flip(); array.putInt(19).flip(); assertEquals(17, new XdrBufferDecodingStream(direct).xdrDecodeInt()); assertEquals(19, new XdrBufferDecodingStream(array).xdrDecodeInt()); assertEquals(4, direct.position()); assertEquals(4, array.position()); }
@Override public int xdrDecodeInt() throws OncRpcException, IOException { if (buf_.remaining() < 4) update_buffer_(); try { return buf_.getInt(); } catch (BufferUnderflowException ex) { throw new IOException("xdr stream too short"); } }
XdrBufferDecodingStream extends XdrDecodingStream { @Override public int xdrDecodeInt() throws OncRpcException, IOException { if (buf_.remaining() < 4) update_buffer_(); try { return buf_.getInt(); } catch (BufferUnderflowException ex) { throw new IOException("xdr stream too short"); } } }
XdrBufferDecodingStream extends XdrDecodingStream { @Override public int xdrDecodeInt() throws OncRpcException, IOException { if (buf_.remaining() < 4) update_buffer_(); try { return buf_.getInt(); } catch (BufferUnderflowException ex) { throw new IOException("xdr stream too short"); } } XdrBufferDecodingStream(ByteBuffer buf, BufferSupplier buf_supplier);  XdrBufferDecodingStream(BufferSupplier buf_supplier);  XdrBufferDecodingStream(int bufsize, BufferSupplier buf_supplier);  XdrBufferDecodingStream(ByteBuffer buf); }
XdrBufferDecodingStream extends XdrDecodingStream { @Override public int xdrDecodeInt() throws OncRpcException, IOException { if (buf_.remaining() < 4) update_buffer_(); try { return buf_.getInt(); } catch (BufferUnderflowException ex) { throw new IOException("xdr stream too short"); } } XdrBufferDecodingStream(ByteBuffer buf, BufferSupplier buf_supplier);  XdrBufferDecodingStream(BufferSupplier buf_supplier);  XdrBufferDecodingStream(int bufsize, BufferSupplier buf_supplier);  XdrBufferDecodingStream(ByteBuffer buf); @Override void beginDecoding(); @Override void endDecoding(); @Override InetAddress getSenderAddress(); @Override int getSenderPort(); @Override int xdrDecodeInt(); @Override byte[] xdrDecodeOpaque(int length); @Override void xdrDecodeOpaque(byte[] opaque, int offset, int length); long readBytes(); long avail(); boolean atEof(); }
XdrBufferDecodingStream extends XdrDecodingStream { @Override public int xdrDecodeInt() throws OncRpcException, IOException { if (buf_.remaining() < 4) update_buffer_(); try { return buf_.getInt(); } catch (BufferUnderflowException ex) { throw new IOException("xdr stream too short"); } } XdrBufferDecodingStream(ByteBuffer buf, BufferSupplier buf_supplier);  XdrBufferDecodingStream(BufferSupplier buf_supplier);  XdrBufferDecodingStream(int bufsize, BufferSupplier buf_supplier);  XdrBufferDecodingStream(ByteBuffer buf); @Override void beginDecoding(); @Override void endDecoding(); @Override InetAddress getSenderAddress(); @Override int getSenderPort(); @Override int xdrDecodeInt(); @Override byte[] xdrDecodeOpaque(int length); @Override void xdrDecodeOpaque(byte[] opaque, int offset, int length); long readBytes(); long avail(); boolean atEof();  }