Package org.apache.juneau.parser
Class ParserInputStream
java.lang.Object
java.io.InputStream
org.apache.juneau.parser.ParserInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Positionable
- Direct Known Subclasses:
MsgPackInputStream
Input stream meant to be used as input for stream-based parsers.
Keeps track of current byte position.
Notes:
- This class is not thread safe.
See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the current position in a reader or input stream.int
read()
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
ParserInputStream
Constructor.- Parameters:
pipe
- The parser input.- Throws:
IOException
- Thrown by underlying stream.
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
getPosition
Description copied from interface:Positionable
Returns the current position in a reader or input stream.- Specified by:
getPosition
in interfacePositionable
- Returns:
- The current position in a reader or input stream.
-