Package com.fasterxml.aalto.in
Class MergedStream
java.lang.Object
java.io.InputStream
com.fasterxml.aalto.in.MergedStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Simple
InputStream implementation that is used to "unwind" some
data previously read from an input stream; so that as long as some of
that data remains, it's returned; but as long as it's read, we'll
just use data from the underlying original stream.
This is similar to PushbackInputStream, but here there's
only one implicit pushback, when instance is constructed.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ReaderConfigprivate byte[]private final intprivate final InputStreamprivate int -
Constructor Summary
ConstructorsConstructorDescriptionMergedStream(ReaderConfig cfg, InputStream in, byte[] buf, int start, int end) -
Method Summary
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
mConfig
-
mIn
-
mData
private byte[] mData -
mPtr
private int mPtr -
mEnd
private final int mEnd
-
-
Constructor Details
-
MergedStream
-
-
Method Details
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
freeBuffers
private void freeBuffers()
-