Package org.apache.activeio.packet
Class FilterPacket
java.lang.Object
org.apache.activeio.packet.FilterPacket
- All Implemented Interfaces:
Packet
- Direct Known Subclasses:
PacketPool.PooledPacket
Provides a Packet implementation that filters operations to another packet.
Used to make it easier to augment the method.
- Version:
- $Revision$
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcapacity()voidclear()voiddispose()duplicate(ClassLoader cl) abstract Packetvoidflip()getAdapter(Class target) booleanintlimit()voidlimit(int limit) intposition()voidposition(int position) intread()intread(byte[] data, int offset, int length) intintvoidrewind()slice()byte[]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
-
next
-
-
Constructor Details
-
FilterPacket
-
-
Method Details
-
asByteSequence
- Specified by:
asByteSequencein interfacePacket
-
capacity
public int capacity() -
clear
public void clear() -
flip
public void flip() -
hasRemaining
public boolean hasRemaining()- Specified by:
hasRemainingin interfacePacket
-
limit
public int limit() -
limit
public void limit(int limit) -
getAdapter
- Specified by:
getAdapterin interfacePacket
-
position
public int position() -
position
public void position(int position) -
read
public int read() -
read
public int read(byte[] data, int offset, int length) -
read
-
remaining
public int remaining() -
rewind
public void rewind() -
sliceAsBytes
public byte[] sliceAsBytes()- Specified by:
sliceAsBytesin interfacePacket
-
write
public int write(byte[] data, int offset, int length) -
write
public boolean write(int data) -
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
-
duplicate
- Specified by:
duplicatein interfacePacket- Throws:
IOException
-
duplicate
-
slice
-
dispose
public void dispose() -
filter
-