Package org.codehaus.jackson.format
Class InputAccessor.Std
java.lang.Object
org.codehaus.jackson.format.InputAccessor.Std
- All Implemented Interfaces:
InputAccessor
- Enclosing interface:
- InputAccessor
Basic implementation that reads data from given
InputStream
and buffers it as necessary.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.codehaus.jackson.format.InputAccessor
InputAccessor.Std
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final byte[]
protected int
Number of bytes in_buffer
that are valid buffered content.protected final InputStream
protected int
Pointer to next available buffered byte in_buffer
. -
Constructor Summary
ConstructorsConstructorDescriptionStd
(byte[] inputDocument) Constructor used when the full input (or at least enough leading bytes of full input) is available.Std
(InputStream in, byte[] buffer) Constructor used when content to check is available via input stream and must be read. -
Method Summary
Modifier and TypeMethodDescriptioncreateMatcher
(JsonFactory match, MatchStrength matchStrength) boolean
Method to call to check if more input is available.byte
nextByte()
Returns next byte available, if any; if no more bytes are available, will throwEOFException
.void
reset()
Method that can be called to reset accessor to read from beginning of input.
-
Field Details
-
Constructor Details
-
Std
Constructor used when content to check is available via input stream and must be read. -
Std
public Std(byte[] inputDocument) Constructor used when the full input (or at least enough leading bytes of full input) is available.
-
-
Method Details
-
hasMoreBytes
Description copied from interface:InputAccessor
Method to call to check if more input is available. Since this may result in more content to be read (at least one more byte), aIOException
may get thrown.- Specified by:
hasMoreBytes
in interfaceInputAccessor
- Throws:
IOException
-
nextByte
Description copied from interface:InputAccessor
Returns next byte available, if any; if no more bytes are available, will throwEOFException
.- Specified by:
nextByte
in interfaceInputAccessor
- Throws:
IOException
-
reset
public void reset()Description copied from interface:InputAccessor
Method that can be called to reset accessor to read from beginning of input.- Specified by:
reset
in interfaceInputAccessor
-
createMatcher
-