Closeable
, AutoCloseable
public class CoordSpanInputSteam extends InputStream
SeekableStream
to produce only bytes specified within coordinates.
Created by vadim on 25/03/2015.Constructor | Description |
---|---|
CoordSpanInputSteam(SeekableStream delegate,
long[] coords) |
Wrap
SeekableStream to read only bytes within boundaries specified in the coords array. |
Modifier and Type | Method | 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, readAllBytes, readNBytes, reset, skip, transferTo
public 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.IOException
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] buffer, int offset, int length) throws IOException
read
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
public void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
close
in class InputStream
IOException