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.- Since:
- 1.8
-
Nested Class Summary
Nested classes/interfaces inherited from interface InputAccessor
InputAccessor.Std -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final byte[]protected intNumber of bytes in_bufferthat are valid buffered content.protected final InputStreamprotected intPointer 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) booleanMethod to call to check if more input is available.bytenextByte()Returns next byte available, if any; if no more bytes are available, will throwEOFException.voidreset()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:InputAccessorMethod to call to check if more input is available. Since this may result in more content to be read (at least one more byte), aIOExceptionmay get thrown.- Specified by:
hasMoreBytesin interfaceInputAccessor- Throws:
IOException
-
nextByte
Description copied from interface:InputAccessorReturns next byte available, if any; if no more bytes are available, will throwEOFException.- Specified by:
nextBytein interfaceInputAccessor- Throws:
IOException
-
reset
public void reset()Description copied from interface:InputAccessorMethod that can be called to reset accessor to read from beginning of input.- Specified by:
resetin interfaceInputAccessor
-
createMatcher
-