org.xsocket.connection
Interface AbstractNonBlockingStream.ISink

Package class diagram package AbstractNonBlockingStream.ISink
Enclosing class:
AbstractNonBlockingStream

public static interface AbstractNonBlockingStream.ISink


Method Summary
 void append(ByteBuffer data)
           
 void append(ByteBuffer[] bufs)
          append a list of byte buffer to this sink.
 ByteBuffer[] copy()
           
 ByteBuffer[] drain()
          drain the sink
 int getSize()
          return the current size
 boolean isEmpty()
          returns true, if empty
 void reset()
          clean the sink
 String toString(String encoding)
           
 

Method Detail

reset

void reset()
clean the sink


isEmpty

boolean isEmpty()
returns true, if empty

Returns:
true, if empty

getSize

int getSize()
return the current size

Returns:
the current size

append

void append(ByteBuffer data)

append

void append(ByteBuffer[] bufs)
append a list of byte buffer to this sink. By adding a list, the list becomes part of to the buffer, and should not be modified outside the buffer to avoid side effects

Parameters:
bufs - the list of ByteBuffer

drain

ByteBuffer[] drain()
drain the sink

Returns:
the queue content

copy

ByteBuffer[] copy()

toString

String toString(String encoding)


Copyright 2010 xSocket.org