public final class DocumentInputStream extends java.io.InputStream implements LittleEndianInput
POIFSFileSystem
instance.
(此类提供读取由 POIFSFileSystem 实例管理的 DocumentEntry 的方法。)
Constructor and Description |
---|
DocumentInputStream(DocumentEntry document)
Create an InputStream from the specified DocumentEntry
|
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.
(测试此输入流是否支持 mark 和 reset 方法。)
|
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
(通常行为与 LittleEndianInput.readFully(byte[], int, int) 相同,但对于加密流,原始(未加密)数据被填充)
|
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.
(将此流重新定位到最后一次在此输入流上调用 mark() 方法时的位置。)
|
long |
skip(long n) |
public DocumentInputStream(DocumentEntry document) throws java.io.IOException
document
- the DocumentEntry to be read
(document - 要读取的 DocumentEntry)
java.io.IOException
- if the DocumentEntry cannot be opened (like, maybe it has been deleted?)
(java.io.IOException - 如果 DocumentEntry 无法打开(例如,它可能已被删除?))
public DocumentInputStream(POIFSDocument document)
document
- the Document to be read
(document - 要阅读的文档)
public int available()
available
in interface
LittleEndianInput
(在接口 LittleEndianInput 中可用)
available
in class
java.io.InputStream
public void close()
close
in interface
java.io.Closeable
(在接口 java.io.Closeable 中关闭)
close
in interface
java.lang.AutoCloseable
(在接口 java.lang.AutoCloseable 中关闭)
close
in class
java.io.InputStream
public boolean markSupported()
markSupported
in class
java.io.InputStream
true
always
(永远真实)
public void mark(int ignoredReadlimit)
mark
in class
java.io.InputStream
public int read() throws java.io.IOException
read
in class
java.io.InputStream
(读入类 java.io.InputStream)
java.io.IOException
(java.io.IOException)
public int read(byte[] b) throws java.io.IOException
read
in class
java.io.InputStream
java.io.IOException
(java.io.IOException)
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class
java.io.InputStream
java.io.IOException
(java.io.IOException)
public void reset()
reset
in class
java.io.InputStream
public long skip(long n) throws java.io.IOException
skip
in class
java.io.InputStream
java.io.IOException
(java.io.IOException)
public void readFully(byte[] buf)
readFully
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readFully)
public void readFully(byte[] buf, int off, int len)
readFully
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readFully)
public void readPlain(byte[] buf, int off, int len)
LittleEndianInput
LittleEndianInput.readFully(byte[], int, int)
, but for an encrypted stream the raw (unencrypted) data is filled
(通常行为与 LittleEndianInput.readFully(byte[], int, int) 相同,但对于加密流,原始(未加密)数据被填充)
readPlain
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readPlain)
buf
- the byte array to receive the bytes
(buf - 接收字节的字节数组)
off
- the start offset into the byte array
(off - 字节数组的起始偏移量)
len
- the amount of bytes to fill
(len - 要填充的字节数)
public byte readByte()
readByte
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readByte)
public double readDouble()
readDouble
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readDouble)
public long readLong()
readLong
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readLong)
public short readShort()
readShort
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readShort)
public int readInt()
readInt
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readInt)
public long readUInt()
public int readUShort()
readUShort
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readUShort)
public int readUByte()
readUByte
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readUByte)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.