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[]
buffer
private int
bufferPos
private SIdChain
chain
private CompoundDocument
document
private long
length
private int
nextSectorPos
private long
streamPos
-
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 int
available()
void
close()
private boolean
fillBuffer()
int
read()
int
read(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:
available
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException
- Specified by:
read
in 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:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
-
-