org.gudy.azureus2.pluginsimpl.local.network
Class TransportImpl
java.lang.Object
org.gudy.azureus2.pluginsimpl.local.network.TransportImpl
- All Implemented Interfaces:
- Transport
public class TransportImpl
- extends java.lang.Object
- implements Transport
Method Summary |
Transport |
coreTransport()
|
long |
read(java.nio.ByteBuffer[] buffers,
int array_offset,
int length)
Read data from the transport into the given buffers. |
void |
setFilter(TransportFilter filter)
|
long |
write(java.nio.ByteBuffer[] buffers,
int array_offset,
int length)
Write data to the transport from the given buffers. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransportImpl
public TransportImpl(NetworkConnection core_network)
TransportImpl
public TransportImpl(Transport core_transport)
read
public long read(java.nio.ByteBuffer[] buffers,
int array_offset,
int length)
throws java.io.IOException
- Description copied from interface:
Transport
- Read data from the transport into the given buffers.
NOTE: Works like ScatteringByteChannel.
- Specified by:
read
in interface Transport
- Parameters:
buffers
- into which bytes are to be placedarray_offset
- offset within the buffer array of the first buffer into which bytes are to be placedlength
- maximum number of buffers to be accessed
- Returns:
- number of bytes read
- Throws:
java.io.IOException
- on read error
write
public long write(java.nio.ByteBuffer[] buffers,
int array_offset,
int length)
throws java.io.IOException
- Description copied from interface:
Transport
- Write data to the transport from the given buffers.
NOTE: Works like GatheringByteChannel.
- Specified by:
write
in interface Transport
- Parameters:
buffers
- from which bytes are to be retrievedarray_offset
- offset within the buffer array of the first buffer from which bytes are to be retrievedlength
- maximum number of buffers to be accessed
- Returns:
- number of bytes written
- Throws:
java.io.IOException
- on write error
coreTransport
public Transport coreTransport()
throws java.io.IOException
- Throws:
java.io.IOException
setFilter
public void setFilter(TransportFilter filter)
throws java.io.IOException
- Specified by:
setFilter
in interface Transport
- Throws:
java.io.IOException