@Test public void testReadFrom() throws Exception { channelBuffer = ChannelBuffers.copiedBuffer(tlv); ipInterfaceAddressTlv.readFrom(channelBuffer); assertThat(ipInterfaceAddressTlv.interfaceAddress().size(), is(1)); }
@Override public void readFrom(ChannelBuffer channelBuffer) { while (channelBuffer.readableBytes() >= 4) { byte[] addressbytes = new byte[IsisUtil.FOUR_BYTES]; channelBuffer.readBytes(addressbytes, 0, IsisUtil.FOUR_BYTES); this.interfaceAddress.add(Ip4Address.valueOf(addressbytes)); } }
IpInterfaceAddressTlv extends TlvHeader implements IsisTlv { @Override public void readFrom(ChannelBuffer channelBuffer) { while (channelBuffer.readableBytes() >= 4) { byte[] addressbytes = new byte[IsisUtil.FOUR_BYTES]; channelBuffer.readBytes(addressbytes, 0, IsisUtil.FOUR_BYTES); this.interfaceAddress.add(Ip4Address.valueOf(addressbytes)); } } }
IpInterfaceAddressTlv extends TlvHeader implements IsisTlv { @Override public void readFrom(ChannelBuffer channelBuffer) { while (channelBuffer.readableBytes() >= 4) { byte[] addressbytes = new byte[IsisUtil.FOUR_BYTES]; channelBuffer.readBytes(addressbytes, 0, IsisUtil.FOUR_BYTES); this.interfaceAddress.add(Ip4Address.valueOf(addressbytes)); } } IpInterfaceAddressTlv(TlvHeader tlvHeader); }
IpInterfaceAddressTlv extends TlvHeader implements IsisTlv { @Override public void readFrom(ChannelBuffer channelBuffer) { while (channelBuffer.readableBytes() >= 4) { byte[] addressbytes = new byte[IsisUtil.FOUR_BYTES]; channelBuffer.readBytes(addressbytes, 0, IsisUtil.FOUR_BYTES); this.interfaceAddress.add(Ip4Address.valueOf(addressbytes)); } } IpInterfaceAddressTlv(TlvHeader tlvHeader); void addInterfaceAddres(Ip4Address interfaceAddress); List<Ip4Address> interfaceAddress(); @Override void readFrom(ChannelBuffer channelBuffer); @Override byte[] asBytes(); @Override String toString(); }
IpInterfaceAddressTlv extends TlvHeader implements IsisTlv { @Override public void readFrom(ChannelBuffer channelBuffer) { while (channelBuffer.readableBytes() >= 4) { byte[] addressbytes = new byte[IsisUtil.FOUR_BYTES]; channelBuffer.readBytes(addressbytes, 0, IsisUtil.FOUR_BYTES); this.interfaceAddress.add(Ip4Address.valueOf(addressbytes)); } } IpInterfaceAddressTlv(TlvHeader tlvHeader); void addInterfaceAddres(Ip4Address interfaceAddress); List<Ip4Address> interfaceAddress(); @Override void readFrom(ChannelBuffer channelBuffer); @Override byte[] asBytes(); @Override String toString();  }