@Test public void testReadFrom() throws Exception { header = new TlvHeader(); header.setTlvLength(8); header.setTlvType(114); unknownLinkSubType = new UnknownLinkSubType(header); channelBuffer = ChannelBuffers.copiedBuffer(packet); unknownLinkSubType.readFrom(channelBuffer); assertThat(unknownLinkSubType, is(notNullValue())); }
public void readFrom(ChannelBuffer channelBuffer) { byte[] tempByteArray = new byte[tlvLength()]; channelBuffer.readBytes(tempByteArray, 0, tlvLength()); this.setValue(tempByteArray); }
UnknownLinkSubType extends TlvHeader implements LinkSubType { public void readFrom(ChannelBuffer channelBuffer) { byte[] tempByteArray = new byte[tlvLength()]; channelBuffer.readBytes(tempByteArray, 0, tlvLength()); this.setValue(tempByteArray); } }
UnknownLinkSubType extends TlvHeader implements LinkSubType { public void readFrom(ChannelBuffer channelBuffer) { byte[] tempByteArray = new byte[tlvLength()]; channelBuffer.readBytes(tempByteArray, 0, tlvLength()); this.setValue(tempByteArray); } UnknownLinkSubType(TlvHeader header); }
UnknownLinkSubType extends TlvHeader implements LinkSubType { public void readFrom(ChannelBuffer channelBuffer) { byte[] tempByteArray = new byte[tlvLength()]; channelBuffer.readBytes(tempByteArray, 0, tlvLength()); this.setValue(tempByteArray); } UnknownLinkSubType(TlvHeader header); byte[] value(); void setValue(byte[] value); void readFrom(ChannelBuffer channelBuffer); byte[] asBytes(); byte[] getLinkSubTypeTlvBodyAsByteArray(); @Override String toString(); }
UnknownLinkSubType extends TlvHeader implements LinkSubType { public void readFrom(ChannelBuffer channelBuffer) { byte[] tempByteArray = new byte[tlvLength()]; channelBuffer.readBytes(tempByteArray, 0, tlvLength()); this.setValue(tempByteArray); } UnknownLinkSubType(TlvHeader header); byte[] value(); void setValue(byte[] value); void readFrom(ChannelBuffer channelBuffer); byte[] asBytes(); byte[] getLinkSubTypeTlvBodyAsByteArray(); @Override String toString();  }