public class DocumentInputStream extends InputStream implements LittleEndianInput
POIFSFileSystem or NPOIFSFileSystem instance.
It creates the appropriate one, and delegates, allowing us to
work transparently with the two.| Modifier and Type | Field and Description |
|---|---|
protected static int |
EOF
returned by read operations if we're at end of document
|
protected static int |
SIZE_INT |
protected static int |
SIZE_LONG |
protected static int |
SIZE_SHORT |
| Modifier | Constructor and Description |
|---|---|
protected |
DocumentInputStream()
For use by downstream implementations
|
|
DocumentInputStream(DocumentEntry document)
Create an InputStream from the specified DocumentEntry
|
|
DocumentInputStream(NPOIFSDocument document)
Create an InputStream from the specified Document
|
|
DocumentInputStream(POIFSDocument document)
Create an InputStream from the specified Document
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
void |
mark(int ignoredReadlimit) |
boolean |
markSupported()
Tests if this input stream supports the mark and reset methods.
|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
byte |
readByte() |
double |
readDouble() |
void |
readFully(byte[] buf) |
void |
readFully(byte[] buf,
int off,
int len) |
int |
readInt() |
long |
readLong() |
short |
readShort() |
int |
readUByte() |
int |
readUShort() |
void |
reset()
Repositions this stream to the position at the time the mark() method was
last called on this input stream.
|
long |
skip(long n) |
protected static final int EOF
protected static final int SIZE_SHORT
protected static final int SIZE_INT
protected static final int SIZE_LONG
protected DocumentInputStream()
public DocumentInputStream(DocumentEntry document) throws IOException
document - the DocumentEntry to be readIOException - if the DocumentEntry cannot be opened (like, maybe it has
been deleted?)public DocumentInputStream(POIFSDocument document)
document - the Document to be readpublic DocumentInputStream(NPOIFSDocument document)
document - the Document to be readpublic int available()
available in interface LittleEndianInputavailable in class InputStreampublic void close()
close in interface Closeableclose in interface AutoCloseableclose in class InputStreampublic void mark(int ignoredReadlimit)
mark in class InputStreampublic boolean markSupported()
markSupported in class InputStreamtrue alwayspublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic void reset()
reset in class InputStreampublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic byte readByte()
readByte in interface LittleEndianInputpublic double readDouble()
readDouble in interface LittleEndianInputpublic short readShort()
readShort in interface LittleEndianInputpublic void readFully(byte[] buf)
readFully in interface LittleEndianInputpublic void readFully(byte[] buf,
int off,
int len)
readFully in interface LittleEndianInputpublic long readLong()
readLong in interface LittleEndianInputpublic int readInt()
readInt in interface LittleEndianInputpublic int readUShort()
readUShort in interface LittleEndianInputpublic int readUByte()
readUByte in interface LittleEndianInputCopyright © 2020. All rights reserved.