|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.apache.poi.poifs.filesystem.DocumentInputStream
public class DocumentInputStream
This class provides methods to read a DocumentEntry managed by a
POIFSFileSystem or NPOIFSFileSystem instance.
It creates the appropriate one, and delegates, allowing us to
work transparently with the two.
| Field Summary | |
|---|---|
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
|
| Constructor Summary | |
|---|---|
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(OPOIFSDocument document)
Create an InputStream from the specified Document |
| Method Summary | |
|---|---|
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()
|
void |
readPlain(byte[] buf,
int off,
int len)
Usually acts the same as LittleEndianInput.readFully(byte[], int, int), but
for an encrypted stream the raw (unencrypted) data is filled |
short |
readShort()
|
int |
readUByte()
|
long |
readUInt()
|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int EOF
protected static final int SIZE_SHORT
protected static final int SIZE_INT
protected static final int SIZE_LONG
| Constructor Detail |
|---|
protected DocumentInputStream()
public DocumentInputStream(DocumentEntry document)
throws java.io.IOException
document - the DocumentEntry to be read
java.io.IOException - if the DocumentEntry cannot be opened (like, maybe it has
been deleted?)public DocumentInputStream(OPOIFSDocument document)
document - the Document to be readpublic DocumentInputStream(NPOIFSDocument document)
document - the Document to be read| Method Detail |
|---|
public int available()
available in interface LittleEndianInputavailable in class java.io.InputStreampublic void close()
close in interface java.io.Closeableclose in class java.io.InputStreampublic void mark(int ignoredReadlimit)
mark in class java.io.InputStreampublic boolean markSupported()
markSupported in class java.io.InputStreamtrue always
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException
public int read(byte[] b)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic void reset()
reset in class java.io.InputStream
public long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic 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 LittleEndianInput
public 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 LittleEndianInputpublic long readUInt()
public void readPlain(byte[] buf,
int off,
int len)
LittleEndianInputLittleEndianInput.readFully(byte[], int, int), but
for an encrypted stream the raw (unencrypted) data is filled
readPlain in interface LittleEndianInputbuf - the byte array to receive the bytesoff - the start offset into the byte arraylen - the amount of bytes to fill
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||