Class ByteSourceJsonBootstrapper

java.lang.Object
com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper

public final class ByteSourceJsonBootstrapper extends Object
This class is used to determine the encoding of byte stream that is to contain JSON content. Rules are fairly simple, and defined in JSON specification (RFC-4627 or newer), except for BOM handling, which is a property of underlying streams.
  • Field Details

    • UTF8_BOM_1

      public static final byte UTF8_BOM_1
      See Also:
    • UTF8_BOM_2

      public static final byte UTF8_BOM_2
      See Also:
    • UTF8_BOM_3

      public static final byte UTF8_BOM_3
      See Also:
    • STRING_READER_BYTE_ARRAY_LENGTH_LIMIT

      private static final int STRING_READER_BYTE_ARRAY_LENGTH_LIMIT
      See Also:
    • _context

      private final IOContext _context
    • _in

      private final InputStream _in
    • _inputBuffer

      private final byte[] _inputBuffer
    • _inputPtr

      private int _inputPtr
    • _inputEnd

      private int _inputEnd
    • _bufferRecyclable

      private final boolean _bufferRecyclable
      Flag that indicates whether buffer above is to be recycled after being used or not.
    • _bigEndian

      private boolean _bigEndian
      Whether input has been detected to be in Big-Endian encoding or not.
    • _bytesPerChar

      private int _bytesPerChar
  • Constructor Details

    • ByteSourceJsonBootstrapper

      public ByteSourceJsonBootstrapper(IOContext ctxt, InputStream in)
    • ByteSourceJsonBootstrapper

      public ByteSourceJsonBootstrapper(IOContext ctxt, byte[] inputBuffer, int inputStart, int inputLen)
  • Method Details