@Immutable final class FsCacheController.EntryCache.Input extends ClutchInputSocket<Entry>
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
FsCacheController.EntryCache.Input.Stream |
| Modifier and Type | Field and Description |
|---|---|
(package private) BitField<FsInputOption> |
options |
| Constructor and Description |
|---|
FsCacheController.EntryCache.Input(BitField<FsInputOption> options) |
| Modifier and Type | Method and Description |
|---|---|
protected InputSocket<? extends Entry> |
getLazyDelegate()
Returns the delegate socket for lazy initialization.
|
InputStream |
newInputStream()
Returns a new input stream for reading bytes from the
local target. |
ReadOnlyFile |
newReadOnlyFile()
Optional: Returns a new read only file for reading bytes from
the
local target in arbitrary order. |
SeekableByteChannel |
newSeekableByteChannel()
Optional: Returns a new seekable byte channel for reading bytes
from the
local target in arbitrary order. |
getDelegate, getLocalTarget, resetgetBoundSocketbind, getPeerTargetfinal BitField<FsInputOption> options
FsCacheController.EntryCache.Input(BitField<FsInputOption> options)
protected InputSocket<? extends Entry> getLazyDelegate()
ClutchInputSocketgetLazyDelegate in class ClutchInputSocket<Entry>public InputStream newInputStream() throws IOException
InputSocketlocal target.
Implementations must enable calling this method any number of times.
Furthermore, the returned input stream should not be buffered.
Buffering should be addressed by the caller instead - see
IOSocket.copy(de.schlichtherle.truezip.socket.InputSocket<?>, de.schlichtherle.truezip.socket.OutputSocket<?>).
The implementation in the class InputSocket calls
InputSocket.newReadOnlyFile() and wraps the resulting object in a new
ReadOnlyFileInputStream as an adapter.
Note that this may violate the contract for this method because
InputSocket.newReadOnlyFile() is allowed to throw an
UnsupportedOperationException while this method is not!
newInputStream in class ClutchInputSocket<Entry>IOException - On any I/O failure.public ReadOnlyFile newReadOnlyFile()
InputSocketlocal target in arbitrary order.
If this method is supported, implementations must enable calling it any number of times. Furthermore, the returned read only file should not be buffered. Buffering should be addressed by client applications instead.
newReadOnlyFile in class ClutchInputSocket<Entry>public SeekableByteChannel newSeekableByteChannel()
InputSocketlocal target in arbitrary order.
If this method is supported, implementations must enable calling it any number of times. Furthermore, the returned seekable byte channel should not be buffered. Buffering should be addressed by client applications instead.
newSeekableByteChannel in class ClutchInputSocket<Entry>Copyright © 2005-2012 Schlichtherle IT Services. All Rights Reserved.