{
buffer.clear();
int size=buffer.capacity();
ByteBuffer bbuf = ((NIOBuffer)buffer).getByteBuffer();
bbuf.position(0);
bbuf.limit(size);
if (size==_applicationBufferSize)
_applicationBuffers.add(buffer);
else if (size==_packetBufferSize)
_packetBuffers.add(buffer);