public class OFByteArrayVendorData extends Object implements OFVendorData
Modifier and Type | Field and Description |
---|---|
protected byte[] |
bytes |
Constructor and Description |
---|
OFByteArrayVendorData()
Construct vendor data with an empty byte array.
|
OFByteArrayVendorData(byte[] bytes)
Construct vendor data with the specified byte array.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes()
Get the associated byte array for this vendor data.
|
int |
getLength()
Get the length of the vendor data.
|
void |
readFrom(org.jboss.netty.buffer.ChannelBuffer data,
int length)
Read the vendor data from the ChannelBuffer into the byte array.
|
void |
setBytes(byte[] bytes)
Set the byte array for the vendor data.
|
void |
writeTo(org.jboss.netty.buffer.ChannelBuffer data)
Write the vendor data bytes to the ChannelBuffer
|
public OFByteArrayVendorData()
public OFByteArrayVendorData(byte[] bytes)
bytes
- public byte[] getBytes()
public void setBytes(byte[] bytes)
bytes
- the raw byte array containing the vendor data.public int getLength()
getLength
in interface OFVendorData
public void readFrom(org.jboss.netty.buffer.ChannelBuffer data, int length)
readFrom
in interface OFVendorData
data
- the channel buffer from which we're deserializinglength
- the length to the end of the enclosing messagepublic void writeTo(org.jboss.netty.buffer.ChannelBuffer data)
writeTo
in interface OFVendorData
data
- the channel buffer to which we're serializingCopyright © 2014. All rights reserved.