public final class Biff8DecryptingStream extends java.lang.Object implements BiffHeaderInput, LittleEndianInput
Modifier and Type | Field and Description |
---|---|
static int |
RC4_REKEYING_INTERVAL |
Constructor and Description |
---|
Biff8DecryptingStream(java.io.InputStream in,
int initialOffset,
EncryptionInfo info) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
long |
getPosition() |
static boolean |
isNeverEncryptedRecord(int sid)
TODO: Additionally, the lbPlyPos (position_of_BOF) field of the BoundSheet8 record MUST NOT be encrypted.
|
byte |
readByte() |
int |
readDataSize()
Reads an unsigned short value without decrypting
|
double |
readDouble() |
void |
readFully(byte[] buf) |
void |
readFully(byte[] buf,
int off,
int len) |
int |
readInt() |
long |
readLong() |
void |
readPlain(byte[] b,
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 |
int |
readRecordSID()
Reads an unsigned short value without decrypting
|
short |
readShort() |
int |
readUByte() |
int |
readUShort() |
public static final int RC4_REKEYING_INTERVAL
public Biff8DecryptingStream(java.io.InputStream in, int initialOffset, EncryptionInfo info) throws RecordFormatException
RecordFormatException
public int available()
available
in interface BiffHeaderInput
available
in interface LittleEndianInput
public int readRecordSID()
readRecordSID
in interface BiffHeaderInput
public int readDataSize()
readDataSize
in interface BiffHeaderInput
public double readDouble()
readDouble
in interface LittleEndianInput
public void readFully(byte[] buf)
readFully
in interface LittleEndianInput
public void readFully(byte[] buf, int off, int len)
readFully
in interface LittleEndianInput
public int readUByte()
readUByte
in interface LittleEndianInput
public byte readByte()
readByte
in interface LittleEndianInput
public int readUShort()
readUShort
in interface LittleEndianInput
public short readShort()
readShort
in interface LittleEndianInput
public int readInt()
readInt
in interface LittleEndianInput
public long readLong()
readLong
in interface LittleEndianInput
public long getPosition()
public static boolean isNeverEncryptedRecord(int sid)
true
if record type specified by sid is never encryptedpublic void readPlain(byte[] b, int off, int len)
LittleEndianInput
LittleEndianInput.readFully(byte[], int, int)
, but
for an encrypted stream the raw (unencrypted) data is filledreadPlain
in interface LittleEndianInput
b
- the byte array to receive the bytesoff
- the start offset into the byte arraylen
- the amount of bytes to fillCopyright 2021 The Apache Software Foundation or its licensors, as applicable.