@Test public void testReadFrom() throws Exception { channelBuffer = ChannelBuffers.copiedBuffer(tlv); isisNeighborTlv.readFrom(channelBuffer); assertThat(isisNeighborTlv.neighbor().size(), is(1)); }
@Override public void readFrom(ChannelBuffer channelBuffer) { while (channelBuffer.readableBytes() >= 6) { byte[] addressbytes = new byte[IsisUtil.SIX_BYTES]; channelBuffer.readBytes(addressbytes, 0, IsisUtil.SIX_BYTES); this.neighbor.add(MacAddress.valueOf(addressbytes)); } }
IsisNeighborTlv extends TlvHeader implements IsisTlv { @Override public void readFrom(ChannelBuffer channelBuffer) { while (channelBuffer.readableBytes() >= 6) { byte[] addressbytes = new byte[IsisUtil.SIX_BYTES]; channelBuffer.readBytes(addressbytes, 0, IsisUtil.SIX_BYTES); this.neighbor.add(MacAddress.valueOf(addressbytes)); } } }
IsisNeighborTlv extends TlvHeader implements IsisTlv { @Override public void readFrom(ChannelBuffer channelBuffer) { while (channelBuffer.readableBytes() >= 6) { byte[] addressbytes = new byte[IsisUtil.SIX_BYTES]; channelBuffer.readBytes(addressbytes, 0, IsisUtil.SIX_BYTES); this.neighbor.add(MacAddress.valueOf(addressbytes)); } } IsisNeighborTlv(TlvHeader tlvHeader); }
IsisNeighborTlv extends TlvHeader implements IsisTlv { @Override public void readFrom(ChannelBuffer channelBuffer) { while (channelBuffer.readableBytes() >= 6) { byte[] addressbytes = new byte[IsisUtil.SIX_BYTES]; channelBuffer.readBytes(addressbytes, 0, IsisUtil.SIX_BYTES); this.neighbor.add(MacAddress.valueOf(addressbytes)); } } IsisNeighborTlv(TlvHeader tlvHeader); void addNeighbor(MacAddress macAddress); List<MacAddress> neighbor(); @Override void readFrom(ChannelBuffer channelBuffer); @Override byte[] asBytes(); @Override String toString(); }
IsisNeighborTlv extends TlvHeader implements IsisTlv { @Override public void readFrom(ChannelBuffer channelBuffer) { while (channelBuffer.readableBytes() >= 6) { byte[] addressbytes = new byte[IsisUtil.SIX_BYTES]; channelBuffer.readBytes(addressbytes, 0, IsisUtil.SIX_BYTES); this.neighbor.add(MacAddress.valueOf(addressbytes)); } } IsisNeighborTlv(TlvHeader tlvHeader); void addNeighbor(MacAddress macAddress); List<MacAddress> neighbor(); @Override void readFrom(ChannelBuffer channelBuffer); @Override byte[] asBytes(); @Override String toString();  }