private final class FsCachingController.Output extends DecoratingOutputSocket<Entry>
| Modifier and Type | Field and Description |
|---|---|
(package private) FsEntryName |
name |
(package private) BitField<FsOutputOption> |
options |
(package private) Entry |
template |
| Constructor and Description |
|---|
FsCachingController.Output(FsEntryName name,
BitField<FsOutputOption> options,
Entry template) |
| Modifier and Type | Method and Description |
|---|---|
OutputSocket<?> |
getBoundSocket()
Binds the decorated socket to this socket and returns it.
|
Entry |
getLocalTarget()
Returns the local target for I/O operations.
|
Entry |
getPeerTarget()
Returns the peer target for I/O operations.
|
OutputStream |
newOutputStream()
Returns a new output stream for writing bytes to the
local target. |
toStringbindfinal FsEntryName name
final BitField<FsOutputOption> options
@CheckForNull final Entry template
FsCachingController.Output(FsEntryName name, BitField<FsOutputOption> options, @CheckForNull Entry template)
public OutputSocket<?> getBoundSocket() throws IOException
DecoratingOutputSocketgetBoundSocket in class DecoratingOutputSocket<Entry>IOExceptionpublic Entry getLocalTarget() throws IOException
IOSocket
Note that this interface contract does not state any other
terms or conditions for the returned object.
In particular, clients need to consider that multiple invocations of
this method could return different objects (e.g. defensive copies) which
may even fail the Object.equals(java.lang.Object) test.
On the other hand, implementations need to consider that clients could
attempt to change the state of the returned object in arbitrary manner.
Consequently, the result of doing so is undefined, too.
In particular, a subsequent I/O operation may not reflect the change
or may even fail.
Sub-interfaces or implementations may add additional terms and
conditions in order to resolve these potential issues.
getLocalTarget in class DecoratingOutputSocket<Entry>IOExceptionpublic Entry getPeerTarget() throws IOException
OutputSocket
The same considerations as for IOSocket.getLocalTarget() apply here, too.
The peer target is null if and only if this socket is not
OutputSocket.connect(de.schlichtherle.truezip.socket.InputSocket<?>)ed to another socket.
getPeerTarget in class DecoratingOutputSocket<Entry>IOExceptionpublic OutputStream newOutputStream() throws IOException
OutputSocketlocal target.
Implementations must enable calling this method any number of times.
Furthermore, the returned output 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<?>).
newOutputStream in class DecoratingOutputSocket<Entry>FileNotFoundException - if the local target is not accessible
for some reason.IOException - on any other exceptional condition.Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.