| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| private final int | |
| private boolean | |
| private final int | |
| private final Cipher | |
| private int | |
| private final byte[] | |
| private long | |
| private final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Overrides org. Implements org. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. |
| protected byte[] | |
| protected int | |
| protected byte[] | |
| public long | |
| public final Cipher | |
| protected abstract Cipher | |
| protected int | invokeCipher(int totalBytes, boolean doFinal)
Helper function for overriding the cipher invocation, i.e. XOR doesn't use a cipher and uses its own implementation |
| public synchronized void | mark(int
the maximum limit of bytes that can be read before
the mark position becomes invalid. readlimit)Overrides org. Marks the current position in this input stream. |
| public boolean | markSupported()
Overrides java. Tests if this input stream supports the |
| private void | |
| public int | |
| public int | read(byte[]
the buffer into which the data is read. b, int the start offset in array off, int b
at which the data is written.the maximum number of bytes to read. len)Overrides org. Reads up to |
| private int | |
| public void | readPlain(byte[]
the byte array to receive the bytes b, int the start offset into the byte array off, int the amount of bytes to fill len)Overrides org. Implements org. Used when BIFF header fields (sid, size) are being read. |
| private int | Returns: the remaining byte until EOFHelper method for forbidden available call - we know the size beforehand, so it's ok ... |
| public synchronized void | reset()
Overrides org. Repositions this stream to the position at the time the
|
| public void | setNextRecordSize(int
the size of the next record recordSize)Some ciphers (actually just XOR) are based on the record size, which needs to be set before decryption |
| public long | skip(final long
the number of bytes to be skipped. n)Overrides java. Skips over and discards |
| chunk | back to summary |
|---|---|
| private final byte[] chunk | |
| chunkBits | back to summary |
|---|---|
| private final int chunkBits | |
| chunkIsValid | back to summary |
|---|---|
| private boolean chunkIsValid | |
| chunkSize | back to summary |
|---|---|
| private final int chunkSize | |
| cipher | back to summary |
|---|---|
| private final Cipher cipher | |
| lastIndex | back to summary |
|---|---|
| private int lastIndex | |
| plain | back to summary |
|---|---|
| private final byte[] plain | |
| pos | back to summary |
|---|---|
| private long pos | |
| size | back to summary |
|---|---|
| private final long size | |
| ChunkedCipherInputStream | back to summary |
|---|---|
| public ChunkedCipherInputStream(InputStream stream, long size, int chunkSize) throws GeneralSecurityException | |
| ChunkedCipherInputStream | back to summary |
|---|---|
| public ChunkedCipherInputStream(InputStream stream, long size, int chunkSize, int initialPos) throws GeneralSecurityException | |
| available | back to summary |
|---|---|
| public int available() Overrides org. Implements org. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. The next caller might be the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes.
| |
| getChunk | back to summary |
|---|---|
protected byte[] getChunk()
| |
| getChunkMask | back to summary |
|---|---|
| protected int getChunkMask() | |
| getPlain | back to summary |
|---|---|
protected byte[] getPlain()
| |
| getPos | back to summary |
|---|---|
public long getPos()
| |
| initCipherForBlock | back to summary |
|---|---|
| public final Cipher initCipherForBlock(int block) throws IOException, GeneralSecurityException | |
| initCipherForBlock | back to summary |
|---|---|
| protected abstract Cipher initCipherForBlock(Cipher existing, int block) throws GeneralSecurityException | |
| invokeCipher | back to summary |
|---|---|
| protected int invokeCipher(int totalBytes, boolean doFinal) throws GeneralSecurityException Helper function for overriding the cipher invocation, i.e. XOR doesn't use a cipher and uses its own implementation | |
| mark | back to summary |
|---|---|
| public synchronized void mark(int readlimit) Overrides org. Doc from java. Marks the current position in this input stream. A subsequent
call to the
The
| |
| markSupported | back to summary |
|---|---|
| public boolean markSupported() Overrides java. Doc from java. Tests if this input stream supports the
| |
| nextChunk | back to summary |
|---|---|
| private void nextChunk() throws GeneralSecurityException, IOException | |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides org. Doc from java. Reads up to
| |
| read | back to summary |
|---|---|
| private int read(byte[] b, int off, int len, boolean readPlain) throws IOException | |
| readPlain | back to summary |
|---|---|
| public void readPlain(byte[] b, int off, int len) Overrides org. Implements org. Used when BIFF header fields (sid, size) are being read. The internal
| |
| remainingBytes | back to summary |
|---|---|
| private int remainingBytes() Helper method for forbidden available call - we know the size beforehand, so it's ok ...
| |
| reset | back to summary |
|---|---|
| public synchronized void reset() Overrides org. Doc from java. Repositions this stream to the position at the time the
Stream marks are intended to be used in situations where you need to read ahead a little to see what's in the stream. Often this is most easily done by invoking some general parser. If the stream is of the type handled by the parse, it just chugs along happily. If the stream is not of that type, the parser should toss an exception when it fails. If this happens within readlimit bytes, it allows the outer code to reset the stream and try another parser.
| |
| setNextRecordSize | back to summary |
|---|---|
| public void setNextRecordSize(int recordSize) Some ciphers (actually just XOR) are based on the record size, which needs to be set before decryption
| |
| skip | back to summary |
|---|---|
| public long skip(final long n) Overrides java. Doc from java. Skips over and discards
| |