Class SmileParser

All Implemented Interfaces:
Closeable, AutoCloseable, Versioned

public class SmileParser extends JsonParserBase
  • Field Details

    • _objectCodec

      protected ObjectCodec _objectCodec
      Codec used for data binding when (if) requested.
    • _mayContainRawBinary

      protected boolean _mayContainRawBinary
      Flag that indicates whether content can legally have raw (unquoted) binary data. Since this information is included both in header and in actual binary data blocks there is redundancy, and we want to ensure settings are compliant. Using application may also want to know this setting in case it does some direct (random) access.
    • _smileBufferRecycler

      protected final SmileBufferRecycler<String> _smileBufferRecycler
      Helper object used for low-level recycling of Smile-generator specific buffers.
      Since:
      1.7
    • _inputStream

      protected InputStream _inputStream
      Input stream that can be used for reading more content, if one in use. May be null, if input comes just as a full buffer, or if the stream has been closed.
    • _inputBuffer

      protected byte[] _inputBuffer
      Current buffer from which data is read; generally data is read into buffer from input source, but in some cases pre-loaded buffer is handed to the parser.
    • _bufferRecyclable

      protected boolean _bufferRecyclable
      Flag that indicates whether the input buffer is recycable (and needs to be returned to recycler once we are done) or not.

      If it is not, it also means that parser can NOT modify underlying buffer.

    • _tokenIncomplete

      protected boolean _tokenIncomplete
      Flag that indicates that the current token has not yet been fully processed, and needs to be finished for some access (or skipped to obtain the next token)
    • _typeByte

      protected int _typeByte
      Type byte of the current token
    • _got32BitFloat

      protected boolean _got32BitFloat
      Specific flag that is set when we encountered a 32-bit floating point value; needed since numeric super classes do not track distinction between float and double, but Smile format does, and we want to retain that separation.
    • _symbols

      protected final BytesToNameCanonicalizer _symbols
      Symbol table that contains field names encountered so far
    • _quadBuffer

      protected int[] _quadBuffer
      Temporary buffer used for name parsing.
    • _quad1

      protected int _quad1
      Quads used for hash calculation
    • _quad2

      protected int _quad2
      Quads used for hash calculation
    • _seenNames

      protected String[] _seenNames
      Array of recently seen field names, which may be back referenced by later fields. Defaults set to enable handling even if no header found.
    • _seenNameCount

      protected int _seenNameCount
    • _seenStringValues

      protected String[] _seenStringValues
      Array of recently seen field names, which may be back referenced by later fields Defaults set to disable handling if no header found.
    • _seenStringValueCount

      protected int _seenStringValueCount
    • _smileRecyclerRef

      protected static final ThreadLocal<SoftReference<SmileBufferRecycler<String>>> _smileRecyclerRef
      ThreadLocal contains a SoftReference to a buffer recycler used to provide a low-cost buffer recycling for Smile-specific buffers.
  • Constructor Details

  • Method Details