public interface ISeekableStreamFactory
SeekableStreams 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.IOExceptionSeekableStream getStreamFor(java.lang.String path) throws java.io.IOException
java.io.IOExceptionSeekableStream 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 streamstream - 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