public class ODFBufferredStreamReader extends ODFStreamReader
contentEntry, contentReader, zipInputStream
Constructor and Description |
---|
ODFBufferredStreamReader(java.io.InputStream in)
Create an ODFBufferredStreamReader with default charset.
|
ODFBufferredStreamReader(java.io.InputStream in,
java.lang.String entryName)
Create an ODFBufferredStreamReader by specified entry name.
|
ODFBufferredStreamReader(java.io.InputStream in,
java.lang.String entryName,
java.lang.String charsetName)
Create an ODFBufferredStreamReader by specified entry name and charset.
|
Modifier and Type | Method and Description |
---|---|
ODFEntry |
getNextEntry()
Reads the next ODF file entry and positions the stream at the beginning of the entry data.
|
void |
init(java.lang.String entryName)
Initialize ODF stream.
|
int |
read(byte[] b,
int off,
int len)
Reads from the current ODF entry into an array of bytes.
|
close, ensureOpen, getContentEntry, isClosed, read
public ODFBufferredStreamReader(java.io.InputStream in) throws java.io.IOException
in
- An InputStreamjava.io.IOException
- if an I/O error has occurredpublic ODFBufferredStreamReader(java.io.InputStream in, java.lang.String entryName) throws java.io.IOException
in
- An InputStreamentryName
- target entry namejava.io.UnsupportedEncodingException
- If the named charset is not supportedjava.util.zip.ZipException
- if a ZIP file error has occurredjava.io.IOException
- if an I/O error has occurredpublic ODFBufferredStreamReader(java.io.InputStream in, java.lang.String entryName, java.lang.String charsetName) throws java.io.IOException
in
- An InputStreamentryName
- target entry namecharsetName
- The name of a supported java.nio.charset.Charset
charset
java.io.UnsupportedEncodingException
- If the named charset is not supportedjava.util.zip.ZipException
- if a ZIP file error has occurredjava.io.IOException
- if an I/O error has occurredpublic void init(java.lang.String entryName) throws java.io.IOException
init
in class ODFStreamReader
entryName
- name of target reading entry.java.io.IOException
- If an I/O error occurspublic int read(byte[] b, int off, int len) throws java.io.IOException
read
in class ODFStreamReader
b
- the buffer into which the data is readoff
- the start offset of the datalen
- the maximum number of bytes readjava.io.IOException
- if an I/O error has occurredpublic ODFEntry getNextEntry() throws java.io.IOException
getNextEntry
in class ODFStreamReader
java.io.IOException
- if an I/O error has occurredCopyright © 2010 - No Magic Asia