@Test(expected = Exception.class) public void testAsBytes() throws Exception { opqueHeader = new OpaqueLsaHeader(); opqueHeader.setLsType(10); opqueHeader.setLsPacketLen(48); opqueHeader.setLsCheckSum(10); opqueHeader.setAge(4); opqueHeader.setOpaqueId(1); opqueHeader.setOpaqueType(10); opqueHeader.setLsSequenceNo(250); opqueHeader.setAdvertisingRouter(Ip4Address.valueOf("100.226.165.165")); opqueHeader.setOptions(66); opaqueLsa10 = new OpaqueLsa10(opqueHeader); channelBuffer = ChannelBuffers.copiedBuffer(packet); opaqueLsa10.readFrom(channelBuffer); result = opaqueLsa10.getLsaBodyAsByteArray(); result = opaqueLsa10.asBytes(); assertThat(result, is(notNullValue())); }
public byte[] asBytes() throws Exception { byte[] lsaMessage = null; byte[] lsaHeader = getOpaqueLsaHeaderAsByteArray(); byte[] lsaBody = getLsaBodyAsByteArray(); lsaMessage = Bytes.concat(lsaHeader, lsaBody); return lsaMessage; }
OpaqueLsa10 extends OpaqueLsaHeader { public byte[] asBytes() throws Exception { byte[] lsaMessage = null; byte[] lsaHeader = getOpaqueLsaHeaderAsByteArray(); byte[] lsaBody = getLsaBodyAsByteArray(); lsaMessage = Bytes.concat(lsaHeader, lsaBody); return lsaMessage; } }
OpaqueLsa10 extends OpaqueLsaHeader { public byte[] asBytes() throws Exception { byte[] lsaMessage = null; byte[] lsaHeader = getOpaqueLsaHeaderAsByteArray(); byte[] lsaBody = getLsaBodyAsByteArray(); lsaMessage = Bytes.concat(lsaHeader, lsaBody); return lsaMessage; } OpaqueLsa10(OpaqueLsaHeader lsaHeader); }
OpaqueLsa10 extends OpaqueLsaHeader { public byte[] asBytes() throws Exception { byte[] lsaMessage = null; byte[] lsaHeader = getOpaqueLsaHeaderAsByteArray(); byte[] lsaBody = getLsaBodyAsByteArray(); lsaMessage = Bytes.concat(lsaHeader, lsaBody); return lsaMessage; } OpaqueLsa10(OpaqueLsaHeader lsaHeader); List<TopLevelTlv> topLevelValues(); void addValue(TopLevelTlv value); void readFrom(ChannelBuffer channelBuffer); byte[] asBytes(); byte[] getLsaBodyAsByteArray(); @Override OspfLsaType getOspfLsaType(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
OpaqueLsa10 extends OpaqueLsaHeader { public byte[] asBytes() throws Exception { byte[] lsaMessage = null; byte[] lsaHeader = getOpaqueLsaHeaderAsByteArray(); byte[] lsaBody = getLsaBodyAsByteArray(); lsaMessage = Bytes.concat(lsaHeader, lsaBody); return lsaMessage; } OpaqueLsa10(OpaqueLsaHeader lsaHeader); List<TopLevelTlv> topLevelValues(); void addValue(TopLevelTlv value); void readFrom(ChannelBuffer channelBuffer); byte[] asBytes(); byte[] getLsaBodyAsByteArray(); @Override OspfLsaType getOspfLsaType(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }