@Test public void decode() throws IOException { final ByteArrayOutputStream os = new ByteArrayOutputStream(); IldcpCodecContextFactory.oer().write(packet, os); final IldcpResponsePacket actual = IldcpCodecContextFactory.oer() .read(IldcpResponsePacket.class, new ByteArrayInputStream(os.toByteArray())); assertThat(actual).isEqualTo(packet); }
@Override public IldcpResponsePacket decode() { final IldcpResponse ildcpResponse; try { ildcpResponse = IldcpCodecContextFactory.oer() .read(IldcpResponse.class, new ByteArrayInputStream(getValueAt(1))); } catch (IOException e) { throw new IldcpCodecException(e.getMessage(), e); } return IldcpResponsePacket.builder() .fulfillment(getValueAt(0)) .ildcpResponse(ildcpResponse) .build(); }
AsnIldcpResponsePacketDataCodec extends AsnSequenceCodec<IldcpResponsePacket> { @Override public IldcpResponsePacket decode() { final IldcpResponse ildcpResponse; try { ildcpResponse = IldcpCodecContextFactory.oer() .read(IldcpResponse.class, new ByteArrayInputStream(getValueAt(1))); } catch (IOException e) { throw new IldcpCodecException(e.getMessage(), e); } return IldcpResponsePacket.builder() .fulfillment(getValueAt(0)) .ildcpResponse(ildcpResponse) .build(); } }
AsnIldcpResponsePacketDataCodec extends AsnSequenceCodec<IldcpResponsePacket> { @Override public IldcpResponsePacket decode() { final IldcpResponse ildcpResponse; try { ildcpResponse = IldcpCodecContextFactory.oer() .read(IldcpResponse.class, new ByteArrayInputStream(getValueAt(1))); } catch (IOException e) { throw new IldcpCodecException(e.getMessage(), e); } return IldcpResponsePacket.builder() .fulfillment(getValueAt(0)) .ildcpResponse(ildcpResponse) .build(); } AsnIldcpResponsePacketDataCodec(); }
AsnIldcpResponsePacketDataCodec extends AsnSequenceCodec<IldcpResponsePacket> { @Override public IldcpResponsePacket decode() { final IldcpResponse ildcpResponse; try { ildcpResponse = IldcpCodecContextFactory.oer() .read(IldcpResponse.class, new ByteArrayInputStream(getValueAt(1))); } catch (IOException e) { throw new IldcpCodecException(e.getMessage(), e); } return IldcpResponsePacket.builder() .fulfillment(getValueAt(0)) .ildcpResponse(ildcpResponse) .build(); } AsnIldcpResponsePacketDataCodec(); @Override IldcpResponsePacket decode(); @Override void encode(IldcpResponsePacket value); }
AsnIldcpResponsePacketDataCodec extends AsnSequenceCodec<IldcpResponsePacket> { @Override public IldcpResponsePacket decode() { final IldcpResponse ildcpResponse; try { ildcpResponse = IldcpCodecContextFactory.oer() .read(IldcpResponse.class, new ByteArrayInputStream(getValueAt(1))); } catch (IOException e) { throw new IldcpCodecException(e.getMessage(), e); } return IldcpResponsePacket.builder() .fulfillment(getValueAt(0)) .ildcpResponse(ildcpResponse) .build(); } AsnIldcpResponsePacketDataCodec(); @Override IldcpResponsePacket decode(); @Override void encode(IldcpResponsePacket value);  }