|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream org.freehep.util.io.RoutedInputStream.Route
Route which can be read up to and including the end marker. When you close the route, all bytes including the end marker will be read/discarded before returning. If you just discard the Route, the underlying stream will still return you all or part of the bytes of this route. If the end marker is set to null, the stream can be read until the underlying stream ends.
Constructor Summary | |
RoutedInputStream.Route(byte[] start,
byte[] end)
Creates a route with given start and end marker. |
Method Summary | |
void |
close()
Closes the stream, and discards any bytes up to and including the end marker. |
byte[] |
getEnd()
Returns end marker. |
byte[] |
getStart()
Returns start marker. |
int |
read()
Returns bytes of this specific route, starting with the start marker, followed by any bytes up to and including the end marker. |
Methods inherited from class java.io.InputStream |
available, mark, markSupported, read, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RoutedInputStream.Route(byte[] start, byte[] end)
Method Detail |
public int read() throws IOException
IOException
public void close() throws IOException
IOException
public byte[] getStart()
public byte[] getEnd()
|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |