E - the type of the target entry for I/O
operations.public interface InputSocket<E extends Entry> extends IoSocket<E>
Implementations should be immutable.
OutputSocket| Modifier and Type | Method and Description |
|---|---|
SeekableByteChannel |
channel(OutputSocket<? extends Entry> peer)
Optional operation: Returns a new seekable byte channel for
reading bytes.
|
InputStream |
stream(OutputSocket<? extends Entry> peer)
Returns a new input stream for reading bytes.
|
@CreatesObligation SeekableByteChannel channel(@Nullable OutputSocket<? extends Entry> peer) throws IOException
Because the intention of this interface is input, the returned channel
may not be able to write data and any attempt to do so should fail with
a NonWritableChannelException.
peer - the nullable peer socket for copying entry contents.UnsupportedOperationException - if this operation is not supported.IOException - on any I/O error.@CreatesObligation InputStream stream(@Nullable OutputSocket<? 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.