public interface ISeekableStreamFactory
SeekableStream
s based on URLs/paths.
Implementations can be set as the default with SeekableStreamFactory.setInstance(ISeekableStreamFactory)
Modifier and Type | Method and Description |
---|---|
SeekableStream |
getBufferedStream(SeekableStream stream)
Return a buffered
SeekableStream which wraps the input stream
using the default buffer size |
SeekableStream |
getBufferedStream(SeekableStream stream,
int bufferSize)
Return a buffered
SeekableStream which wraps the input stream |
SeekableStream |
getStreamFor(java.lang.String path) |
default SeekableStream |
getStreamFor(java.lang.String path,
java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> wrapper)
Open a stream from the input path, applying the wrapper to the stream.
|
SeekableStream |
getStreamFor(java.net.URL url) |
SeekableStream getStreamFor(java.net.URL url) throws java.io.IOException
java.io.IOException
SeekableStream getStreamFor(java.lang.String path) throws java.io.IOException
java.io.IOException
SeekableStream getBufferedStream(SeekableStream stream)
SeekableStream
which wraps the input stream
using the default buffer sizestream
- SeekableStream getBufferedStream(SeekableStream stream, int bufferSize)
SeekableStream
which wraps the input stream
stream
- bufferSize
- default SeekableStream getStreamFor(java.lang.String path, java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> wrapper) throws java.io.IOException
path
- a uri like String representing a resource to openwrapper
- a wrapper to apply to the streamjava.io.IOException