public static class

InputAccessor.Std

extends Object
implements InputAccessor
java.lang.Object
   ↳ com.fasterxml.jackson.core.format.InputAccessor.Std

Class Overview

Basic implementation that reads data from given InputStream and buffers it as necessary.

Summary

Fields
protected final byte[] _buffer
protected int _bufferedAmount Number of bytes in _buffer that are valid buffered content.
protected final InputStream _in
protected int _ptr Pointer to next available buffered byte in _buffer.
Public Constructors
InputAccessor.Std(InputStream in, byte[] buffer)
Constructor used when content to check is available via input stream and must be read.
InputAccessor.Std(byte[] inputDocument)
Constructor used when the full input (or at least enough leading bytes of full input) is available.
Public Methods
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 java.io.EOFException.
void reset()
Method that can be called to reset accessor to read from beginning of input.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.fasterxml.jackson.core.format.InputAccessor

Fields

protected final byte[] _buffer

protected int _bufferedAmount

Number of bytes in _buffer that are valid buffered content.

protected final InputStream _in

protected int _ptr

Pointer to next available buffered byte in _buffer.

Public Constructors

public InputAccessor.Std (InputStream in, byte[] buffer)

Constructor used when content to check is available via input stream and must be read.

public InputAccessor.Std (byte[] inputDocument)

Constructor used when the full input (or at least enough leading bytes of full input) is available.

Public Methods

public DataFormatMatcher createMatcher (JsonFactory match, MatchStrength matchStrength)

public boolean hasMoreBytes ()

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), a IOException may get thrown.

Throws
IOException

public byte nextByte ()

Returns next byte available, if any; if no more bytes are available, will throw java.io.EOFException.

Throws
IOException

public void reset ()

Method that can be called to reset accessor to read from beginning of input.