Class InputAccessor.Std
java.lang.Object
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.core.format.InputAccessor.Std
- All Implemented Interfaces:
InputAccessor
- Direct Known Subclasses:
DataFormatReaders.AccessorForReader
- 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 edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.core.format.InputAccessor
InputAccessor.Std
-
Field Summary
Modifier and TypeFieldDescriptionprotected final byte[]
protected int
End of valid bytes in the buffer (points to one past last valid)protected final int
protected final InputStream
protected int
Pointer to next available buffered byte in_buffer
. -
Constructor Summary
ConstructorDescriptionStd
(byte[] inputDocument) Std
(byte[] inputDocument, int start, int len) Std
(InputStream in, byte[] buffer) -
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
-
_in
-
_buffer
protected final byte[] _buffer -
_bufferedStart
protected final int _bufferedStart -
_bufferedEnd
protected int _bufferedEndEnd of valid bytes in the buffer (points to one past last valid) -
_ptr
protected int _ptrPointer to next available buffered byte in_buffer
.
-
-
Constructor Details
-
Std
-
Std
public Std(byte[] inputDocument) -
Std
public Std(byte[] inputDocument, int start, int len)
-
-
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
- Returns:
- Whether there is at least one more input byte accessible
- Throws:
IOException
- If check for more content failed due to issue with underlying input abstraction
-
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
- Returns:
- Next content byte, if available
- Throws:
IOException
- If called and there is no more content available
-
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
-