Package org.apache.activeio.packet
Class EOSPacket
java.lang.Object
org.apache.activeio.packet.EOSPacket
- All Implemented Interfaces:
Packet
Provides a Packet implementation that is used to represent the end of a stream.
- Version:
- $Revision$
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintcapacity()voidclear()voiddispose()duplicate(ClassLoader cl) voidflip()getAdapter(Class target) booleanintlimit()voidlimit(int limit) intposition()voidposition(int position) intread()intread(byte[] data, int offset, int length) intintvoidrewind()slice()byte[]toString()intwrite(byte[] data, int offset, int length) booleanwrite(int data) voidwriteTo(DataOutput out) voidwriteTo(OutputStream out) Writes the remaing bytes in the packet to the output stream.
-
Field Details
-
EOS_PACKET
-
-
Method Details
-
writeTo
Description copied from interface:PacketWrites the remaing bytes in the packet to the output stream.- Specified by:
writeToin interfacePacket- Parameters:
out-- Throws:
IOException
-
writeTo
- Specified by:
writeToin interfacePacket- Throws:
IOException
-
position
public int position() -
position
public void position(int position) -
limit
public int limit() -
limit
public void limit(int limit) -
flip
public void flip() -
remaining
public int remaining() -
rewind
public void rewind() -
hasRemaining
public boolean hasRemaining()- Specified by:
hasRemainingin interfacePacket
-
clear
public void clear() -
capacity
public int capacity() -
slice
-
duplicate
-
duplicate
- Specified by:
duplicatein 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) -
asByteSequence
- Specified by:
asByteSequencein interfacePacket
-
sliceAsBytes
public byte[] sliceAsBytes()- Specified by:
sliceAsBytesin interfacePacket
-
read
-
toString
-
getAdapter
- Specified by:
getAdapterin interfacePacket
-
dispose
public void dispose()
-