public class RoutedInputStream extends DecodingInputStream
| Modifier and Type | Class and Description |
|---|---|
class |
RoutedInputStream.Route
Route which can be read up to and including the end marker.
|
| Constructor and Description |
|---|
RoutedInputStream(InputStream input)
Creates a RoutedInputStream from the underlying stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRoute(byte[] start,
byte[] end,
RouteListener listener)
Adds a route for given start and end marker.
|
void |
addRoute(String start,
String end,
RouteListener listener)
Adds a route for given start and end string.
|
int |
read()
Returns the next byte on this stream, however if a start marker is found,
the associated route listener is called, which should take over reading
the stream.
|
readavailable, close, mark, markSupported, read, reset, skippublic RoutedInputStream(InputStream input)
input - stream to readpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic void addRoute(String start, String end, RouteListener listener)
start - start markerend - end markerlistener - listener to inform about the routepublic void addRoute(byte[] start,
byte[] end,
RouteListener listener)
start - start markerend - end markerlistener - listener to inform about the routeCopyright © 2016. All rights reserved.