private static class ConnectionHolder.MemoryConnectionHolder extends ConnectionHolder
Modifier and Type | Field and Description |
---|---|
private java.nio.ByteBuffer |
backingBuffer |
buffer, channel
Constructor and Description |
---|
MemoryConnectionHolder(java.nio.ByteBuffer buf) |
Modifier and Type | Method and Description |
---|---|
void |
closeConnection()
Closes connection when done.
|
(package private) boolean |
isRandomAccess()
Detects whether the source is a random access source.
|
(package private) boolean |
isSeekable()
Detects whether the source is seekable.
|
(package private) boolean |
needBuffer()
Detects whether this source needs buffering at the pipeline level.
|
(package private) int |
readBlock(long position,
int size)
Reads a block of data from the arbitrary position of the opened stream.
|
long |
seek(long position)
Performs a seek request to the desired position.
|
createFileConnectionHolder, createHLSConnectionHolder, createMemoryConnectionHolder, createURIConnectionHolder, getBuffer, getStreamSize, property, readNextBlock
int readBlock(long position, int size) throws java.io.IOException
ConnectionHolder
readBlock
in class ConnectionHolder
java.nio.channels.ClosedChannelException
- if an attempt is made to read after
closeConnection has been calledjava.io.IOException
boolean needBuffer()
ConnectionHolder
needBuffer
in class ConnectionHolder
boolean isSeekable()
ConnectionHolder
isSeekable
in class ConnectionHolder
boolean isRandomAccess()
ConnectionHolder
isRandomAccess
in class ConnectionHolder
public long seek(long position)
ConnectionHolder
seek
in class ConnectionHolder
public void closeConnection()
ConnectionHolder
closeConnection
in class ConnectionHolder