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, readNextBlockint readBlock(long position,
int size)
throws java.io.IOException
ConnectionHolderreadBlock in class ConnectionHolderjava.nio.channels.ClosedChannelException - if an attempt is made to read after
closeConnection has been calledjava.io.IOExceptionboolean needBuffer()
ConnectionHolderneedBuffer in class ConnectionHolderboolean isSeekable()
ConnectionHolderisSeekable in class ConnectionHolderboolean isRandomAccess()
ConnectionHolderisRandomAccess in class ConnectionHolderpublic long seek(long position)
ConnectionHolderseek in class ConnectionHolderpublic void closeConnection()
ConnectionHoldercloseConnection in class ConnectionHolder