public static class InputAccessor.Std extends Object implements InputAccessor
InputStream and buffers it as necessary.InputAccessor.Std| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
_buffer |
protected int |
_bufferedEnd
End of valid bytes in the buffer (points to one past last valid)
|
protected int |
_bufferedStart |
protected InputStream |
_in |
protected int |
_ptr
Pointer to next available buffered byte in
_buffer. |
| Constructor and Description |
|---|
Std(byte[] inputDocument) |
Std(byte[] inputDocument,
int start,
int len) |
Std(InputStream in,
byte[] buffer) |
| Modifier and Type | Method and Description |
|---|---|
DataFormatMatcher |
createMatcher(JsonFactory match,
MatchStrength matchStrength) |
boolean |
hasMoreBytes()
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 throw
EOFException. |
void |
reset()
Method that can be called to reset accessor to read from beginning of input.
|
protected final InputStream _in
protected final byte[] _buffer
protected final int _bufferedStart
protected int _bufferedEnd
protected int _ptr
_buffer.public Std(InputStream in, byte[] buffer)
public Std(byte[] inputDocument)
public Std(byte[] inputDocument,
int start,
int len)
public boolean hasMoreBytes()
throws IOException
InputAccessorIOException may get thrown.hasMoreBytes in interface InputAccessorIOException - If check for more content failed due to issue with
underlying input abstractionpublic byte nextByte()
throws IOException
InputAccessorEOFException.nextByte in interface InputAccessorIOException - If called and there is no more content availablepublic void reset()
InputAccessorreset in interface InputAccessorpublic DataFormatMatcher createMatcher(JsonFactory match, MatchStrength matchStrength)
Copyright © 2008–2022 FasterXML. All rights reserved.