Methods Summary |
---|
public TransportHelper | getHelper()
return( transport );
|
public java.lang.String | getName()
return((is_plain?"Plain":"None") + getHelper().getName());
|
public boolean | hasBufferedRead()
return( read_insert != null && read_insert.remaining() > 0 );
|
public boolean | hasBufferedWrite()
return( transport.hasDelayedWrite());
|
protected void | insertRead(java.nio.ByteBuffer _read_insert)
read_insert = _read_insert;
|
public boolean | isEncrypted()
return( false );
|
public long | read(java.nio.ByteBuffer[] buffers, int array_offset, int length)
int len = 0;
if ( read_insert != null ){
int pos_before = read_insert.position();
for (int i=array_offset;i<array_offset+length;i++){
ByteBuffer buffer = buffers[i];
int space = buffer.remaining();
if ( space > 0 ){
if ( space < read_insert.remaining()){
int old_limit = read_insert.limit();
read_insert.limit( read_insert.position() + space );
buffer.put( read_insert );
read_insert.limit( old_limit );
}else{
buffer.put( read_insert );
}
if ( !read_insert.hasRemaining()){
break;
}
}
}
len = read_insert.position() - pos_before;
if ( read_insert.hasRemaining()){
return( len );
}else{
read_insert = null;
}
}
return( len + transport.read( buffers, array_offset, length ));
|
public int | read(java.nio.ByteBuffer buffer)
if ( read_insert != null ){
return((int)read( new ByteBuffer[]{ buffer }, 0, 1 ));
}
return( transport.read( buffer ));
|
public void | setTrace(boolean on)
transport.setTrace( on );
|
public long | write(java.nio.ByteBuffer[] buffers, int array_offset, int length)
return( transport.write( buffers, array_offset, length ));
|
public int | write(java.nio.ByteBuffer buffer, boolean partial_write)
return( transport.write( buffer, partial_write ));
|