Class NonBlockingByteArrayParser

java.lang.Object
tools.jackson.core.JsonParser
tools.jackson.core.base.ParserMinimalBase
All Implemented Interfaces:
Closeable, AutoCloseable, tools.jackson.core.async.ByteArrayFeeder, tools.jackson.core.async.NonBlockingInputFeeder, tools.jackson.core.Versioned

public class NonBlockingByteArrayParser extends NonBlockingParserBase implements tools.jackson.core.async.ByteArrayFeeder
  • Field Details

    • _inputBuffer

      protected byte[] _inputBuffer
      This buffer is actually provided via NonBlockingInputFeeder
    • _origBufferLen

      protected int _origBufferLen
      In addition to current buffer pointer, and end pointer, we will also need to know number of bytes originally contained. This is needed to correctly update location information when the block has been completed.
  • Constructor Details

    • NonBlockingByteArrayParser

      public NonBlockingByteArrayParser(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ioCtxt, int parserFeatures, int smileFeatures, tools.jackson.core.sym.ByteQuadsCanonicalizer sym)
  • Method Details

    • nonBlockingInputFeeder

      public tools.jackson.core.async.ByteArrayFeeder nonBlockingInputFeeder()
      Overrides:
      nonBlockingInputFeeder in class tools.jackson.core.JsonParser
    • needMoreInput

      public final boolean needMoreInput()
      Specified by:
      needMoreInput in interface tools.jackson.core.async.NonBlockingInputFeeder
    • feedInput

      public void feedInput(byte[] buf, int start, int end) throws tools.jackson.core.JacksonException
      Specified by:
      feedInput in interface tools.jackson.core.async.ByteArrayFeeder
      Throws:
      tools.jackson.core.JacksonException
    • endOfInput

      public void endOfInput()
      Specified by:
      endOfInput in interface tools.jackson.core.async.NonBlockingInputFeeder
    • releaseBuffered

      public int releaseBuffered(OutputStream out) throws tools.jackson.core.JacksonException
      Specified by:
      releaseBuffered in class NonBlockingParserBase
      Throws:
      tools.jackson.core.JacksonException
    • nextToken

      public tools.jackson.core.JsonToken nextToken() throws tools.jackson.core.JacksonException
      Specified by:
      nextToken in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • _finishToken

      protected final tools.jackson.core.JsonToken _finishToken() throws tools.jackson.core.JacksonException
      Method called when a (scalar) value type has been detected, but not all of contents have been decoded due to incomplete input available.
      Throws:
      tools.jackson.core.JacksonException
    • _finishHeader

      protected tools.jackson.core.JsonToken _finishHeader(int state) throws tools.jackson.core.JacksonException
      Helper method that will decode information from a header block that has been detected.
      Throws:
      tools.jackson.core.JacksonException
    • _startValue

      private final tools.jackson.core.JsonToken _startValue(int ch) throws tools.jackson.core.JacksonException
      Helper method called to detect type of a value token (at any level), and possibly decode it if contained in input buffer. Note that possible header has been ruled out by caller and is not checked here.
      Throws:
      tools.jackson.core.JacksonException
    • _startFieldName

      protected final tools.jackson.core.JsonToken _startFieldName(int ch) throws tools.jackson.core.JacksonException
      Method that handles initial token type recognition for token that has to be either PROPERTY_NAME or END_OBJECT.
      Throws:
      tools.jackson.core.JacksonException
    • _finishLongFieldName

      private final tools.jackson.core.JsonToken _finishLongFieldName(int outPtr) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _startShortASCII

      private final tools.jackson.core.JsonToken _startShortASCII(int len) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _startShortUnicode

      private final tools.jackson.core.JsonToken _startShortUnicode(int len) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _startLongASCII

      private final tools.jackson.core.JsonToken _startLongASCII() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishLongASCII

      private final tools.jackson.core.JsonToken _finishLongASCII() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _startLongUnicode

      protected final tools.jackson.core.JsonToken _startLongUnicode() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishLongUnicode

      private final tools.jackson.core.JsonToken _finishLongUnicode() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishPartialUnicodeChar

      private final boolean _finishPartialUnicodeChar() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodeUTF8_2

      private final int _decodeUTF8_2(int c, int d) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodeUTF8_3

      private final int _decodeUTF8_3(int c, int d, int e) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodeUTF8_4

      private final int _decodeUTF8_4(int c, int d, int e, int f) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _startInt

      private final tools.jackson.core.JsonToken _startInt() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishInt

      private final tools.jackson.core.JsonToken _finishInt(int value, int bytesRead) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _startLong

      private final tools.jackson.core.JsonToken _startLong() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishLong

      private final tools.jackson.core.JsonToken _finishLong(long value, int bytesRead) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _startBigInt

      private final tools.jackson.core.JsonToken _startBigInt() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishBigIntLen

      private final tools.jackson.core.JsonToken _finishBigIntLen(int value, int bytesRead) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishBigIntBody

      private final tools.jackson.core.JsonToken _finishBigIntBody() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _startFloat

      protected final tools.jackson.core.JsonToken _startFloat() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishFloat

      protected final tools.jackson.core.JsonToken _finishFloat(int value, int bytesRead) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _startDouble

      protected final tools.jackson.core.JsonToken _startDouble() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishDouble

      protected final tools.jackson.core.JsonToken _finishDouble(long value, int bytesRead) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _startBigDecimal

      private final tools.jackson.core.JsonToken _startBigDecimal() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishBigDecimalScale

      private final tools.jackson.core.JsonToken _finishBigDecimalScale(int value, int bytesRead) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishBigDecimalLen

      private final tools.jackson.core.JsonToken _finishBigDecimalLen(int value, int bytesRead) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishBigDecimalBody

      private final tools.jackson.core.JsonToken _finishBigDecimalBody() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _startRawBinary

      protected final tools.jackson.core.JsonToken _startRawBinary() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishRawBinaryLen

      private final tools.jackson.core.JsonToken _finishRawBinaryLen(int value, int bytesRead) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishRawBinaryBody

      private final tools.jackson.core.JsonToken _finishRawBinaryBody() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _start7BitBinary

      private final tools.jackson.core.JsonToken _start7BitBinary() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finish7BitBinaryLen

      private final tools.jackson.core.JsonToken _finish7BitBinaryLen(int value, int bytesRead) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finish7BitBinaryBody

      private final tools.jackson.core.JsonToken _finish7BitBinaryBody() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodeASCIIText

      private final String _decodeASCIIText(byte[] inBuf, int inPtr, int len) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodeShortUnicodeText

      private final String _decodeShortUnicodeText(byte[] inBuf, int inPtr, int len) throws tools.jackson.core.JacksonException
      Helper method used to decode short Unicode string, length for which actual length (in bytes) is known
      Parameters:
      len - Length between 1 and 64
      Throws:
      tools.jackson.core.JacksonException
    • _decodeLongUnicodeName

      private final String _decodeLongUnicodeName(byte[] inBuf, int inPtr, int len) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _fourBytesToInt

      private final int _fourBytesToInt(int ptr) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodeVInt

      private final int _decodeVInt() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decode7BitEncoded

      private final boolean _decode7BitEncoded() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decode7BitEncodedTail

      protected final boolean _decode7BitEncodedTail(int bytesToDecode, int buffered) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException