List of usage examples for io.netty.buffer ByteBuf writerIndex
public abstract int writerIndex();
From source file:org.opendaylight.capwap.msgelements.DeleteStation.java
License:Open Source License
@Override public int encode(ByteBuf buf) { int start = buf.writerIndex(); buf.writeByte(ByteManager.shortToUnsingedByte(this.radioId)); this.macAddress.encode(buf); return buf.writerIndex() - start; }
From source file:org.opendaylight.capwap.msgelements.DiscoveryType.java
License:Open Source License
public int encode(ByteBuf buf) { int start = buf.writerIndex(); System.out.printf("\nWriter index @ function %d %s", buf.writerIndex(), "encode"); int end = 0;//from www .j a v a 2 s . c om buf.writeByte(this.discoveryType); end = buf.writerIndex(); return end - start; }
From source file:org.opendaylight.capwap.msgelements.DuplicateIPV4Addr.java
License:Open Source License
@Override public int encode(ByteBuf buf) { int start = buf.writerIndex(); this.ipv4.encode(buf); buf.writeByte(ByteManager.shortToUnsingedByte(this.getStatus())); this.macAddress.encode(buf); return buf.writerIndex() - start; }
From source file:org.opendaylight.capwap.msgelements.ECNSupport.java
License:Open Source License
@Override public int encode(ByteBuf buf) { int start = buf.writerIndex(); buf.writeByte(this.ecn); return buf.writerIndex() - start; }
From source file:org.opendaylight.capwap.msgelements.IdleTimeOut.java
License:Open Source License
@Override public int encode(ByteBuf buf) { int start = buf.writerIndex(); buf.writeBytes(ByteManager.unsignedIntToArray(this.timout)); return buf.writerIndex() - start; }
From source file:org.opendaylight.capwap.msgelements.ImageData.java
License:Open Source License
@Override public int encode(ByteBuf buf) { int start = buf.writerIndex(); buf.writeByte(this.dataType); buf.writeBytes(this.data); return buf.writerIndex() - start; }
From source file:org.opendaylight.capwap.msgelements.ImageIdentifier.java
License:Open Source License
@Override public int encode(ByteBuf buf) { int start = buf.writerIndex(); buf.writeBytes(ByteManager.unsignedIntToArray(this.vendorID)); buf.writeBytes(this.data); return buf.writerIndex() - start; }
From source file:org.opendaylight.capwap.msgelements.ImageInformation.java
License:Open Source License
@Override public int encode(ByteBuf buf) { int start = buf.writerIndex(); buf.writeBytes(ByteManager.unsignedIntToArray(this.fileSize)); buf.writeBytes(this.hash); return buf.writerIndex() - start; }
From source file:org.opendaylight.capwap.msgelements.IPV4AddrList.java
License:Open Source License
@Override public int encode(ByteBuf buf) { int start = buf.writerIndex(); for (IPV4Address addr : list) { addr.encode(buf);/*w w w .j a v a 2 s . c o m*/ } return buf.writerIndex() - start; }
From source file:org.opendaylight.capwap.msgelements.LocationData.java
License:Open Source License
@Override public int encode(ByteBuf buf) { int start = buf.writerIndex(); buf.writeBytes(this.locationData); return buf.writerIndex() - start; }