public final class ByteSourceBootstrapper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
_bigEndian |
protected int |
_bytesPerChar |
protected IOContext |
_context |
protected java.io.InputStream |
_in |
protected byte[] |
_inputBuffer |
protected int |
_inputProcessed
Current number of input units (bytes or chars) that were processed in
previous blocks,
before contents of current input buffer.
|
Constructor and Description |
---|
ByteSourceBootstrapper(IOContext ctxt,
byte[] inputBuffer,
int inputStart,
int inputLen) |
ByteSourceBootstrapper(IOContext ctxt,
java.io.InputStream in) |
Modifier and Type | Method and Description |
---|---|
JsonParser |
constructParser(int features,
ObjectCodec codec,
BytesToNameCanonicalizer rootByteSymbols,
CharsToNameCanonicalizer rootCharSymbols) |
java.io.Reader |
constructReader() |
JsonEncoding |
detectEncoding()
Method that should be called after constructing an instace.
|
protected boolean |
ensureLoaded(int minimum) |
static MatchStrength |
hasJSONFormat(InputAccessor acc)
Current implementation is not as thorough as other functionality
(
ByteSourceBootstrapper );
supports UTF-8, for example. |
protected final IOContext _context
protected final java.io.InputStream _in
protected final byte[] _inputBuffer
protected int _inputProcessed
Note: includes possible BOMs, if those were part of the input.
protected boolean _bigEndian
protected int _bytesPerChar
public ByteSourceBootstrapper(IOContext ctxt, java.io.InputStream in)
public ByteSourceBootstrapper(IOContext ctxt, byte[] inputBuffer, int inputStart, int inputLen)
public JsonEncoding detectEncoding() throws java.io.IOException, JsonParseException
java.io.IOException
JsonParseException
public java.io.Reader constructReader() throws java.io.IOException
java.io.IOException
public JsonParser constructParser(int features, ObjectCodec codec, BytesToNameCanonicalizer rootByteSymbols, CharsToNameCanonicalizer rootCharSymbols) throws java.io.IOException, JsonParseException
java.io.IOException
JsonParseException
public static MatchStrength hasJSONFormat(InputAccessor acc) throws java.io.IOException
ByteSourceBootstrapper
);
supports UTF-8, for example. But it should work, for now, and can
be improved as necessary.java.io.IOException
protected boolean ensureLoaded(int minimum) throws java.io.IOException
java.io.IOException