| Modifier and Type | Field and Description |
|---|---|
| private final File | |
| private final long | |
| private long | |
| private final SharedFileInputStream | |
| private long | |
| private final long | |
| private List |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public long | getPosition()
Implements javax. |
| public SharedFileInputStream | Returns: the base of the shared stream tree.Return the shared stream that represents the top most stream that this stream inherits from. |
| public void | mark(int
the maximum limit of bytes that can be read before
the mark position becomes invalid. readLimit)Overrides java. |
| public boolean | markSupported()
Overrides java. mark
and reset methods.
|
| public InputStream | newStream(long
the starting position start, long the ending position + 1 finish)Implements javax. start (inclusive)
up to end (exclusive).
|
| public int | read(byte[]
the buffer into which the data is read. buf)Overrides java. b.length bytes of data from this
input stream into an array of bytes.
|
| public int | read(byte[]
the buffer into which the data is read. buf, int the start offset in array off, int b
at which the data is written.the maximum number of bytes to read. len)Overrides java. len bytes of data from this input stream
into an array of bytes.
|
| public int | |
| public void | reset()
Overrides java. mark method was last called on this input stream.
|
| public long | skip(long
the number of bytes to be skipped. n)Overrides java. n bytes of data from the
input stream.
|
| _file | back to summary |
|---|---|
| private final File _file | |
| _length | back to summary |
|---|---|
| private final long _length | |
| _markedPosition | back to summary |
|---|---|
| private long _markedPosition | |
| _parent | back to summary |
|---|---|
| private final SharedFileInputStream _parent | |
| _position | back to summary |
|---|---|
| private long _position | |
| _start | back to summary |
|---|---|
| private final long _start | |
| _subStreams | back to summary |
|---|---|
| private List<E> _subStreams | |
| SharedFileInputStream | back to summary |
|---|---|
| public SharedFileInputStream(String fileName) throws IOException | |
| SharedFileInputStream | back to summary |
|---|---|
| public SharedFileInputStream(File file) throws IOException | |
| SharedFileInputStream | back to summary |
|---|---|
| private SharedFileInputStream(File file, long start, long length) throws IOException | |
| SharedFileInputStream | back to summary |
|---|---|
| private SharedFileInputStream(SharedFileInputStream parent, long start, long length) throws IOException | |
| dispose | back to summary |
|---|---|
| public void dispose() throws IOException Close of this stream and any substreams that have been created from it.
| |
| getPosition | back to summary |
|---|---|
| public long getPosition() Implements javax. Doc from javax. Return the current position in the InputStream, as an offset from the beginning of the InputStream.
| |
| getRoot | back to summary |
|---|---|
| public SharedFileInputStream getRoot() Return the shared stream that represents the top most stream that this stream inherits from.
| |
| mark | back to summary |
|---|---|
| public void mark(int readLimit) Overrides java. Doc from java. Marks the current position in this input stream. A subsequent
call to the
The
| |
| markSupported | back to summary |
|---|---|
| public boolean markSupported() Overrides java. Doc from java. Tests if this input stream supports the
| |
| newStream | back to summary |
|---|---|
| public InputStream newStream(long start, long finish) Implements javax. Doc from javax. Return a new InputStream representing a subset of the data
from this InputStream, starting at
| |
| read | back to summary |
|---|---|
| public int read(byte[] buf) throws IOException Overrides java. Doc from java. Reads up to
| |
| read | back to summary |
|---|---|
| public int read(byte[] buf, int off, int len) throws IOException Overrides java. Doc from java. Reads up to
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| reset | back to summary |
|---|---|
| public void reset() throws IOException Overrides java. Doc from java. Repositions this stream to the position at the time the
Stream marks are intended to be used in situations where you need to read ahead a little to see what's in the stream. Often this is most easily done by invoking some general parser. If the stream is of the type handled by the parse, it just chugs along happily. If the stream is not of that type, the parser should toss an exception when it fails. If this happens within readlimit bytes, it allows the outer code to reset the stream and try another parser.
| |
| skip | back to summary |
|---|---|
| public long skip(long n) throws IOException Overrides java. Doc from java. Skips over and discards
| |