org.apache.poi.poifs.filesystem
Class ODocumentInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.poi.poifs.filesystem.DocumentInputStream
-
- org.apache.poi.poifs.filesystem.ODocumentInputStream
-
- All Implemented Interfaces:
- java.io.Closeable, java.lang.AutoCloseable, LittleEndianInput
public final class ODocumentInputStream extends DocumentInputStream
This class provides methods to read a DocumentEntry managed by aPOIFSFileSysteminstance.
-
-
Constructor Summary
Constructors Constructor and Description ODocumentInputStream(DocumentEntry document)Create an InputStream from the specified DocumentEntryODocumentInputStream(POIFSDocument document)Create an InputStream from the specified Document
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intavailable()voidclose()voidmark(int ignoredReadlimit)intread()intread(byte[] b, int off, int len)bytereadByte()doublereadDouble()voidreadFully(byte[] buf, int off, int len)intreadInt()longreadLong()shortreadShort()intreadUByte()intreadUShort()voidreset()Repositions this stream to the position at the time the mark() method was last called on this input stream.longskip(long n)-
Methods inherited from class org.apache.poi.poifs.filesystem.DocumentInputStream
markSupported, read, readFully, readUInt
-
-
-
-
Constructor Detail
-
ODocumentInputStream
public ODocumentInputStream(DocumentEntry document) throws java.io.IOException
Create an InputStream from the specified DocumentEntry- Parameters:
document- the DocumentEntry to be read- Throws:
java.io.IOException- if the DocumentEntry cannot be opened (like, maybe it has been deleted?)
-
ODocumentInputStream
public ODocumentInputStream(POIFSDocument document)
Create an InputStream from the specified Document- Parameters:
document- the Document to be read
-
-
Method Detail
-
available
public int available()
- Specified by:
availablein interfaceLittleEndianInput- Overrides:
availablein classDocumentInputStream
-
close
public void close()
- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfacejava.lang.AutoCloseable- Overrides:
closein classDocumentInputStream
-
mark
public void mark(int ignoredReadlimit)
- Overrides:
markin classDocumentInputStream
-
read
public int read() throws java.io.IOException- Overrides:
readin classDocumentInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classDocumentInputStream- Throws:
java.io.IOException
-
reset
public void reset()
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.- Overrides:
resetin classDocumentInputStream
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classDocumentInputStream- Throws:
java.io.IOException
-
readByte
public byte readByte()
- Specified by:
readBytein interfaceLittleEndianInput- Overrides:
readBytein classDocumentInputStream
-
readDouble
public double readDouble()
- Specified by:
readDoublein interfaceLittleEndianInput- Overrides:
readDoublein classDocumentInputStream
-
readShort
public short readShort()
- Specified by:
readShortin interfaceLittleEndianInput- Overrides:
readShortin classDocumentInputStream
-
readFully
public void readFully(byte[] buf, int off, int len)- Specified by:
readFullyin interfaceLittleEndianInput- Overrides:
readFullyin classDocumentInputStream
-
readLong
public long readLong()
- Specified by:
readLongin interfaceLittleEndianInput- Overrides:
readLongin classDocumentInputStream
-
readInt
public int readInt()
- Specified by:
readIntin interfaceLittleEndianInput- Overrides:
readIntin classDocumentInputStream
-
readUShort
public int readUShort()
- Specified by:
readUShortin interfaceLittleEndianInput- Overrides:
readUShortin classDocumentInputStream
-
readUByte
public int readUByte()
- Specified by:
readUBytein interfaceLittleEndianInput- Overrides:
readUBytein classDocumentInputStream
-
-
DataMelt 3.0 © DataMelt by jWork.ORG