@Test public void testEncodeWellKnown() throws IOException { byte[] data = new byte[]{ 0x0C, 0x0A, 0x0F, 0x0E, 0x0B, 0x0A, 0x0B, 0x0E }; byte[] expected = new byte[]{ 0x0, 0x0, 0x0, 0x08, 0x0C, 0x0A, 0x0F, 0x0E, 0x0B, 0x0A, 0x0B, 0x0E }; try (Xdr xdr = new Xdr(16)) { xdr.beginEncoding(); XdrOpaque opaque = new XdrOpaque(data); opaque.xdrEncode(xdr); xdr.endEncoding(); assertArrayEquals(expected, xdr.getBytes()); } }
@Override public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, IOException { xdr.xdrEncodeDynamicOpaque(_opaque); }
XdrOpaque implements XdrAble { @Override public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, IOException { xdr.xdrEncodeDynamicOpaque(_opaque); } }
XdrOpaque implements XdrAble { @Override public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, IOException { xdr.xdrEncodeDynamicOpaque(_opaque); } XdrOpaque();  XdrOpaque(byte[] opaque);  XdrOpaque(XdrDecodingStream xdr); }
XdrOpaque implements XdrAble { @Override public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, IOException { xdr.xdrEncodeDynamicOpaque(_opaque); } XdrOpaque();  XdrOpaque(byte[] opaque);  XdrOpaque(XdrDecodingStream xdr); byte[] getOpaque(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); @Override void xdrDecode(XdrDecodingStream xdr); @Override void xdrEncode(XdrEncodingStream xdr); }
XdrOpaque implements XdrAble { @Override public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, IOException { xdr.xdrEncodeDynamicOpaque(_opaque); } XdrOpaque();  XdrOpaque(byte[] opaque);  XdrOpaque(XdrDecodingStream xdr); byte[] getOpaque(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); @Override void xdrDecode(XdrDecodingStream xdr); @Override void xdrEncode(XdrEncodingStream xdr);  }