|
TrueZIP Kernel 7.0-rc1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.schlichtherle.truezip.socket.IOSocket<E,Entry>
de.schlichtherle.truezip.socket.OutputSocket<E>
de.schlichtherle.truezip.socket.DecoratingOutputSocket<E>
E - The type of the local target.public abstract class DecoratingOutputSocket<E extends Entry>
An abstract decorator for an output socket.
DecoratingInputSocket| Field Summary | |
|---|---|
private OutputSocket<? extends E> |
delegate
|
| Constructor Summary | |
|---|---|
protected |
DecoratingOutputSocket(OutputSocket<? extends E> output)
|
| Method Summary | |
|---|---|
protected OutputSocket<? extends E> |
getBoundSocket()
Binds the decorated socket to this socket and returns it. |
E |
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. |
String |
toString()
Returns a string representation of this object for debugging and logging purposes. |
| Methods inherited from class de.schlichtherle.truezip.socket.OutputSocket |
|---|
bind, connect |
| Methods inherited from class de.schlichtherle.truezip.socket.IOSocket |
|---|
copy, equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final OutputSocket<? extends E extends Entry> delegate
| Constructor Detail |
|---|
protected DecoratingOutputSocket(@NonNull
OutputSocket<? extends E> output)
| Method Detail |
|---|
protected OutputSocket<? extends E> getBoundSocket()
throws IOException
IOException
public E 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 IOSocket<E extends Entry,Entry>IOException
public 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 OutputSocket<E extends Entry>IOException
public 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 OutputSocket<E extends Entry>FileNotFoundException - if the local target is not accessible
for some reason.
IOException - on any other exceptional condition.public String toString()
toString in class IOSocket<E extends Entry,Entry>
|
TrueZIP Kernel 7.0-rc1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||