Package com.twelvemonkeys.io.ole2
Class CompoundDocument.Stream
- java.lang.Object
-
- java.io.InputStream
-
- com.twelvemonkeys.io.ole2.CompoundDocument.Stream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- CompoundDocument
static class CompoundDocument.Stream extends java.io.InputStream
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]bufferprivate intbufferPosprivate SIdChainchainprivate CompoundDocumentdocumentprivate longlengthprivate intnextSectorPosprivate longstreamPos
-
Constructor Summary
Constructors Constructor Description Stream(SIdChain chain, int streamSize, int sectorSize, CompoundDocument document)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()private booleanfillBuffer()intread()intread(byte[] b, int off, int len)
-
-
-
Field Detail
-
chain
private final SIdChain chain
-
document
private final CompoundDocument document
-
length
private final long length
-
streamPos
private long streamPos
-
nextSectorPos
private int nextSectorPos
-
buffer
private byte[] buffer
-
bufferPos
private int bufferPos
-
-
Constructor Detail
-
Stream
public Stream(SIdChain chain, int streamSize, int sectorSize, CompoundDocument document)
-
-
Method Detail
-
available
public int available() throws java.io.IOException- Overrides:
availablein classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
fillBuffer
private boolean fillBuffer() throws java.io.IOException- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
-