Package org.apache.activeio.packet
Class AppendedPacket
java.lang.Object
org.apache.activeio.packet.AppendedPacket
- All Implemented Interfaces:
Packet
Appends two packets together.
- Version:
- $Revision$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
capacity()
void
clear()
void
dispose()
duplicate
(ClassLoader cl) void
flip()
getAdapter
(Class target) boolean
static Packet
int
limit()
void
limit
(int limit) int
position()
void
position
(int position) int
read()
int
read
(byte[] data, int offset, int length) int
int
void
rewind()
slice()
byte[]
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.
-
Constructor Details
-
AppendedPacket
Deprecated.use instead.
-
-
Method Details
-
join
-
position
public void position(int position) -
limit
public void limit(int limit) -
slice
-
duplicate
-
duplicate
- Specified by:
duplicate
in interfacePacket
- Throws:
IOException
-
flip
public void flip() -
position
public int position() -
limit
public int limit() -
remaining
public int remaining() -
rewind
public void rewind() -
hasRemaining
public boolean hasRemaining()- Specified by:
hasRemaining
in interfacePacket
-
clear
public void clear() -
capacity
public int capacity() -
writeTo
Description copied from interface:Packet
Writes the remaing bytes in the packet to the output stream.- Specified by:
writeTo
in interfacePacket
- Throws:
IOException
-
writeTo
- Specified by:
writeTo
in interfacePacket
- Throws:
IOException
-
read
public int read() -
read
public int read(byte[] data, int offset, int length) -
write
public boolean write(int data) -
write
public int write(byte[] data, int offset, int length) -
read
-
toString
-
getAdapter
- Specified by:
getAdapter
in interfacePacket
-
asByteSequence
- Specified by:
asByteSequence
in interfacePacket
-
sliceAsBytes
public byte[] sliceAsBytes()- Specified by:
sliceAsBytes
in interfacePacket
-
dispose
public void dispose()
-