public class CoordSpanInputSteam extends InputStream
SeekableStream to produce only bytes specified within coordinates.
Created by vadim on 25/03/2015.| Constructor and Description |
|---|
CoordSpanInputSteam(SeekableStream delegate,
long[] coords)
Wrap
SeekableStream to read only bytes within boundaries specified in the coords array. |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Returns how many bytes are left in the current chunk.
|
void |
close() |
int |
read() |
int |
read(byte[] buffer,
int offset,
int length) |
mark, markSupported, read, reset, skippublic CoordSpanInputSteam(SeekableStream delegate, long[] coords) throws IOException
SeekableStream to read only bytes within boundaries specified in the coords array.
The coords array consists of [inclusive; exclusive) pairs of long coordinates.
This constructor will throw exception if a start coordinate is beyond stream length.
End coordinates are capped at the stream length.IOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] buffer,
int offset,
int length)
throws IOException
read in class InputStreamIOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOException