E
- the type of the target entry for I/O
operations.public interface OutputSocket<E extends Entry> extends IoSocket<E>
Implementations should be immutable.
InputSocket
Modifier and Type | Method and Description |
---|---|
SeekableByteChannel |
channel(InputSocket<? extends Entry> peer)
Optional operation: Returns a new seekable byte channel for
writing bytes.
|
OutputStream |
stream(InputSocket<? extends Entry> peer)
Returns a new output stream for writing bytes.
|
@CreatesObligation SeekableByteChannel channel(@CheckForNull InputSocket<? extends Entry> peer) throws IOException
Because the intention of this interface is output, the returned channel
may not be able to position the file pointer or read data and any
attempt to do so may fail with a NonReadableChannelException
.
peer
- the nullable peer socket for copying entry contents.UnsupportedOperationException
- if this operation is not supported.IOException
- on any I/O error.@CreatesObligation OutputStream stream(@CheckForNull InputSocket<? extends Entry> peer) throws IOException
peer
- the nullable peer socket for copying entry contents.IOException
- on any I/O error.Copyright © 2012–2015 Schlichtherle IT Services. All rights reserved.