@Test public void testReadFrom() throws Exception { opqueHeader = new OpaqueLsaHeader(); opqueHeader.setLsType(1); opqueHeader.setLsPacketLen(48); opqueHeader.setLsCheckSum(10); opqueHeader.setAge(4); opqueHeader.setOpaqueId(9); opqueHeader.setOpaqueType(9); opqueHeader.setLsSequenceNo(250); opqueHeader.setAdvertisingRouter(Ip4Address.valueOf("100.226.165.165")); opqueHeader.setOptions(2); opaqueLsa9 = new OpaqueLsa9(opqueHeader); channelBuffer = ChannelBuffers.copiedBuffer(packet); opaqueLsa9.readFrom(channelBuffer); assertThat(opaqueLsa9, is(notNullValue())); }
public void readFrom(ChannelBuffer channelBuffer) { int length = channelBuffer.readableBytes(); opaqueInfo = new byte[length]; channelBuffer.readBytes(opaqueInfo, 0, length); }
OpaqueLsa9 extends OpaqueLsaHeader { public void readFrom(ChannelBuffer channelBuffer) { int length = channelBuffer.readableBytes(); opaqueInfo = new byte[length]; channelBuffer.readBytes(opaqueInfo, 0, length); } }
OpaqueLsa9 extends OpaqueLsaHeader { public void readFrom(ChannelBuffer channelBuffer) { int length = channelBuffer.readableBytes(); opaqueInfo = new byte[length]; channelBuffer.readBytes(opaqueInfo, 0, length); } OpaqueLsa9(OpaqueLsaHeader lsaHeader); }
OpaqueLsa9 extends OpaqueLsaHeader { public void readFrom(ChannelBuffer channelBuffer) { int length = channelBuffer.readableBytes(); opaqueInfo = new byte[length]; channelBuffer.readBytes(opaqueInfo, 0, length); } OpaqueLsa9(OpaqueLsaHeader lsaHeader); void readFrom(ChannelBuffer channelBuffer); byte[] asBytes(); byte[] getLsaBodyAsByteArray(); @Override OspfLsaType getOspfLsaType(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
OpaqueLsa9 extends OpaqueLsaHeader { public void readFrom(ChannelBuffer channelBuffer) { int length = channelBuffer.readableBytes(); opaqueInfo = new byte[length]; channelBuffer.readBytes(opaqueInfo, 0, length); } OpaqueLsa9(OpaqueLsaHeader lsaHeader); void readFrom(ChannelBuffer channelBuffer); byte[] asBytes(); byte[] getLsaBodyAsByteArray(); @Override OspfLsaType getOspfLsaType(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }