Class Overview
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.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Fields
protected
boolean
_bigEndian
protected
int
_bytesPerChar
protected
final
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.
Note: includes possible BOMs, if those were part of the input.
Public Constructors
public
ByteSourceJsonBootstrapper
(IOContext ctxt, byte[] inputBuffer, int inputStart, int inputLen)
Public Methods
public
Reader
constructReader
()
public
JsonEncoding
detectEncoding
()
Method that should be called after constructing an instace.
It will figure out encoding that content uses, to allow
for instantiating a proper scanner object.
Current implementation is not as thorough as other functionality
(ByteSourceJsonBootstrapper
);
supports UTF-8, for example. But it should work, for now, and can
be improved as necessary.
Protected Methods
protected
boolean
ensureLoaded
(int minimum)