| Constructor and Description |
|---|
ByteArrayPacket(byte[] buffer) |
ByteArrayPacket(byte[] buffer,
int offset,
int capacity) |
ByteArrayPacket(ByteSequence sequence) |
| Modifier and Type | Method and Description |
|---|---|
ByteSequence |
asByteSequence() |
int |
capacity() |
void |
clear() |
void |
dispose() |
Packet |
duplicate() |
Object |
duplicate(ClassLoader cl) |
void |
flip() |
Object |
getAdapter(Class target) |
byte[] |
getBuffer() |
boolean |
hasRemaining() |
int |
limit() |
void |
limit(int limit) |
int |
position() |
void |
position(int position) |
int |
read() |
int |
read(byte[] data,
int offset,
int length) |
int |
read(Packet dest) |
int |
remaining() |
void |
rewind() |
Packet |
slice() |
byte[] |
sliceAsBytes() |
String |
toString() |
int |
write(byte[] data,
int offset,
int length) |
boolean |
write(int data) |
void |
writeTo(DataOutput out) |
void |
writeTo(OutputStream out)
Writes the remaing bytes in the packet to the output stream.
|
public ByteArrayPacket(byte[] buffer)
public ByteArrayPacket(ByteSequence sequence)
public ByteArrayPacket(byte[] buffer,
int offset,
int capacity)
public boolean hasRemaining()
hasRemaining in interface Packetpublic Object duplicate(ClassLoader cl) throws IOException
duplicate in interface PacketIOExceptionpublic void writeTo(OutputStream out) throws IOException
PacketwriteTo in interface PacketIOExceptionpublic void writeTo(DataOutput out) throws IOException
writeTo in interface PacketIOExceptionpublic int read()
read in interface PacketPacket.read()public int read(byte[] data,
int offset,
int length)
read in interface PacketPacket.read(byte[], int, int)public boolean write(int data)
write in interface PacketPacket.write(int)public int write(byte[] data,
int offset,
int length)
write in interface PacketPacket.write(byte[], int, int)public ByteSequence asByteSequence()
asByteSequence in interface Packetpublic byte[] sliceAsBytes()
sliceAsBytes in interface PacketPacket.sliceAsBytes()public int read(Packet dest)
public Object getAdapter(Class target)
getAdapter in interface Packetpublic byte[] getBuffer()
Copyright © 2005–2019. All rights reserved.