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.
(TODO:此外,BoundSheet8 记录的 lbPlyPos (position_of_BOF) 字段不得加密。)
|
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
(通常行为与 LittleEndianInput.readFully(byte[], int, int) 相同,但对于加密流,原始(未加密)数据被填充)
|
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
(在接口 BiffHeaderInput 中可用)
available
in interface
LittleEndianInput
(在接口 LittleEndianInput 中可用)
public int readRecordSID()
readRecordSID
in interface
BiffHeaderInput
(接口 BiffHeaderInput 中的 readRecordSID)
public int readDataSize()
readDataSize
in interface
BiffHeaderInput
(接口 BiffHeaderInput 中的 readDataSize)
public double readDouble()
readDouble
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readDouble)
public void readFully(byte[] buf)
readFully
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readFully)
public void readFully(byte[] buf, int off, int len)
readFully
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readFully)
public int readUByte()
readUByte
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readUByte)
public byte readByte()
readByte
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readByte)
public int readUShort()
readUShort
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readUShort)
public short readShort()
readShort
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readShort)
public int readInt()
readInt
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readInt)
public long readLong()
readLong
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readLong)
public long getPosition()
public static boolean isNeverEncryptedRecord(int sid)
true
if record type specified by
sid is never encrypted
(如果 sid 指定的记录类型从不加密,则为 true)
public void readPlain(byte[] b, int off, int len)
LittleEndianInput
LittleEndianInput.readFully(byte[], int, int)
, but for an encrypted stream the raw (unencrypted) data is filled
(通常行为与 LittleEndianInput.readFully(byte[], int, int) 相同,但对于加密流,原始(未加密)数据被填充)
readPlain
in interface
LittleEndianInput
(接口 LittleEndianInput 中的 readPlain)
b
- the byte array to receive the bytes
(b - 接收字节的字节数组)
off
- the start offset into the byte array
(off - 字节数组的起始偏移量)
len
- the amount of bytes to fill
(len - 要填充的字节数)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.