org.codehaus.jackson.io
Class ByteSourceBootstrapper
java.lang.Object
org.codehaus.jackson.io.ByteSourceBootstrapper
public final class ByteSourceBootstrapper
- 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 Summary |
protected int |
mInputProcessed
Current number of input units (bytes or chars) that were processed in
previous blocks,
before contents of current input buffer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mInputProcessed
protected int mInputProcessed
- 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.
bootstrap
public static Reader bootstrap(IOContext ctxt,
InputStream in)
throws IOException,
JsonParseException
- Throws:
IOException
JsonParseException
bootstrap
public static Reader bootstrap(IOContext ctxt,
byte[] inputBuffer,
int inputStart,
int inputLen)
throws IOException,
JsonParseException
- Throws:
IOException
JsonParseException
ensureLoaded
protected boolean ensureLoaded(int minimum)
throws IOException
- Throws:
IOException
Apache License, Version 2.0