public class CoordSpanInputSteam
extends java.io.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) |
public CoordSpanInputSteam(SeekableStream delegate, long[] coords) throws java.io.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.java.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buffer,
int offset,
int length)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOException