| Constructor and Description |
|---|
AbstractSource() |
| Modifier and Type | Method and Description |
|---|---|
SeekableByteChannel |
channel()
Optional operation: Returns a seekable byte channel for
reading bytes.
|
InputStream |
stream()
Returns an input stream for reading bytes.
|
public SeekableByteChannel channel() throws IOException
Because the intention of this interface is input, the returned channel
does not need to be able to write data and any attempt to do so may fail
with a NonWritableChannelException.
channel in interface SourceUnsupportedOperationException - the implementation in the class
AbstractSource always throws an exception of
this type.IOException - on any I/O error.public InputStream stream() throws IOException
The implementation in the class AbstractSource calls
channel() and wraps the result in a
ChannelInputStream adapter.
Note that this violates the contract for this method unless you
override either this method or channel() with a valid
implementation.
stream in interface SourceIOException - on any I/O error.Copyright © 2012–2014 Schlichtherle IT Services. All rights reserved.