public class ByteBufferContext extends HTTPContext
Constructor and Description |
---|
ByteBufferContext(java.nio.ByteBuffer buffer) |
Modifier and Type | Method and Description |
---|---|
long |
getSize() |
long |
read(java.nio.channels.SocketChannel channel,
long position)
read as much bytes as possible, from the resource to the given channel.
|
getPath
public long getSize()
getSize
in class HTTPContext
public long read(java.nio.channels.SocketChannel channel, long position) throws java.io.IOException
HTTPContext
read
in class HTTPContext
channel
- the channel to write toposition
- the beginning position to read, inclusive.java.io.IOException