POIFSFileSystem instance.
| Modifier and Type | Field and Description |
|---|---|
| private ByteBuffer | |
| private boolean | _closed
have we been closed? |
| private int | _current_block_count
current block count |
| private int | _current_offset
current offset into the Document |
| private Iterator | |
| private final POIFSDocument | _document
the actual Document |
| private final int | _document_size
the Document's size |
| private int | _marked_offset
current marked offset into the Document (used by mark and reset) |
| private int | _marked_offset_count
and the block count for it |
| private static final int | EOF
returned by read operations if we're at end of document |
| Access | Constructor and Description |
|---|---|
| public | DocumentInputStream(DocumentEntry
the DocumentEntry to be read document)Create an InputStream from the specified DocumentEntry |
| public | DocumentInputStream(POIFSDocument
the Document to be read document)Create an InputStream from the specified Document |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| public int | available()
Overrides java. Implements org. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. |
| private void | |
| public void | close()
Overrides java. Implements java. Closes this input stream and releases any system resources associated with the stream. |
| private void | |
| public synchronized void | mark(int
the maximum limit of bytes that can be read before
the mark position becomes invalid. ignoredReadlimit)Overrides java. Marks the current position in this input stream. |
| public boolean | Returns: true alwaysOverrides java. Tests if this input stream supports the mark and reset methods. |
| public int | read()
Implements abstract java. Reads the next byte of data from the input stream. |
| public int | read(byte[]
the buffer into which the data is read. b)Overrides java. Reads some number of bytes from the input stream and stores them into
the buffer array |
| public int | read(byte[]
the buffer into which the data is read. b, 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. Reads up to |
| public byte | |
| public double | |
| public void | |
| public void | |
| public int | |
| public long | |
| public void | readPlain(byte[]
the byte array to receive the bytes buf, int the start offset into the byte array off, int the amount of bytes to fill len)Implements org. Usually acts the same as |
| public short | |
| public int | |
| public long | |
| public int | |
| private int | Returns: the bytes remaining until the end of the streamHelper methods for forbidden api calls |
| public synchronized void | reset()
Overrides java. Repositions this stream to the position at the time the mark() method was last called on this input stream. |
| public long | skip(long
the number of bytes to be skipped. n)Overrides java. Skips over and discards |
| _buffer | back to summary |
|---|---|
| private ByteBuffer _buffer | |
| _closed | back to summary |
|---|---|
| private boolean _closed have we been closed? | |
| _current_block_count | back to summary |
|---|---|
| private int _current_block_count current block count | |
| _current_offset | back to summary |
|---|---|
| private int _current_offset current offset into the Document | |
| _data | back to summary |
|---|---|
| private Iterator<ByteBuffer> _data | |
| _document | back to summary |
|---|---|
| private final POIFSDocument _document the actual Document | |
| _document_size | back to summary |
|---|---|
| private final int _document_size the Document's size | |
| _marked_offset | back to summary |
|---|---|
| private int _marked_offset current marked offset into the Document (used by mark and reset) | |
| _marked_offset_count | back to summary |
|---|---|
| private int _marked_offset_count and the block count for it | |
| EOF | back to summary |
|---|---|
| private static final int EOF returned by read operations if we're at end of document | |
| DocumentInputStream | back to summary |
|---|---|
| public DocumentInputStream(DocumentEntry document) throws IOException Create an InputStream from the specified DocumentEntry
| |
| DocumentInputStream | back to summary |
|---|---|
| public DocumentInputStream(POIFSDocument document) Create an InputStream from the specified Document
| |
| atEOD | back to summary |
|---|---|
| private boolean atEOD() | |
| available | back to summary |
|---|---|
| public int available() Overrides java. Implements org. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. The read might be on the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes. Note that while some implementations of A subclass's implementation of this method may choose to throw an
| |
| checkAvaliable | back to summary |
|---|---|
| private void checkAvaliable(int requestedSize) | |
| close | back to summary |
|---|---|
| public void close() Overrides java. Implements java. Doc from java. Closes this input stream and releases any system resources associated with the stream.
| |
| dieIfClosed | back to summary |
|---|---|
| private void dieIfClosed() throws IOException | |
| mark | back to summary |
|---|---|
| public synchronized void mark(int ignoredReadlimit) Overrides java. Doc from java. Marks the current position in this input stream. A subsequent call to
the The The general contract of Marking a closed stream should not have any effect on the stream.
| |
| markSupported | back to summary |
|---|---|
| public boolean markSupported() Overrides java. Tests if this input stream supports the mark and reset methods.
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public int read(byte[] b) throws IOException Overrides java. Doc from java. Reads some number of bytes from the input stream and stores them into
the buffer array If the length of The first byte read is stored into element
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Reads up to This method blocks until input data is available, end of file is detected, or an exception is thrown. If The first byte read is stored into element In every case, elements
| |
| readByte | back to summary |
|---|---|
| public byte readByte() Implements org.
| |
| readDouble | back to summary |
|---|---|
| public double readDouble() Implements org.
| |
| readFully | back to summary |
|---|---|
| public void readFully(byte[] buf) Implements org.
| |
| readFully | back to summary |
|---|---|
| public void readFully(byte[] buf, int off, int len) Implements org.
| |
| readInt | back to summary |
|---|---|
| public int readInt() Implements org.
| |
| readLong | back to summary |
|---|---|
| public long readLong() Implements org.
| |
| readPlain | back to summary |
|---|---|
| public void readPlain(byte[] buf, int off, int len) Implements org. Doc from org. Usually acts the same as
| |
| readShort | back to summary |
|---|---|
| public short readShort() Implements org.
| |
| readUByte | back to summary |
|---|---|
| public int readUByte() Implements org.
| |
| readUInt | back to summary |
|---|---|
| public long readUInt() | |
| readUShort | back to summary |
|---|---|
| public int readUShort() Implements org.
| |
| remainingBytes | back to summary |
|---|---|
| private int remainingBytes() Helper methods for forbidden api calls
| |
| reset | back to summary |
|---|---|
| public synchronized void reset() Overrides java. Repositions this stream to the position at the time the mark() method was last called on this input stream. If mark() has not been called this method repositions the stream to its beginning.
| |
| skip | back to summary |
|---|---|
| public long skip(long n) throws IOException Overrides java. Doc from java. Skips over and discards
| |