static class SaxReaderImpl.MemptrInputStream
extends java.io.InputStream
Modifier and Type | Field and Description |
---|---|
private boolean |
isStarted
Lazy initialization flag.
|
private memptr |
mptr
A valid memptr
|
private java.util.concurrent.atomic.AtomicLong |
position
Current read cursor position, started from index 1.
|
private long |
totalSize
total size of memptr.
|
Constructor and Description |
---|
MemptrInputStream(memptr source)
Constructor accepting a memptr, which will read after first call.
|
Modifier and Type | Method and Description |
---|---|
int |
read()
Reads the next byte of data from the input stream.
|
void |
reset()
Resets the input stream to begin reading from the first character
of this input stream's underlying buffer.
|
private volatile boolean isStarted
private final memptr mptr
private final java.util.concurrent.atomic.AtomicLong position
private long totalSize
MemptrInputStream(memptr source)
source
- A valid memptr object.public int read() throws java.io.IOException
int
in the range 0
to
255
. If no byte is available because the end of the stream
has been reached, the value -1
is returned.read
in class java.io.InputStream
java.io.IOException
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException