public final class ContinuableRecordOutput extends java.lang.Object implements LittleEndianOutput
LittleEndianOutput
used for serialization of ContinuableRecord
s.
This class keeps track of how much remaining space is available in the current BIFF record and
can start new ContinueRecord
s as required.Constructor and Description |
---|
ContinuableRecordOutput(LittleEndianOutput out,
int sid) |
Modifier and Type | Method and Description |
---|---|
static ContinuableRecordOutput |
createForCountingOnly() |
int |
getAvailableSpace() |
int |
getTotalSize() |
void |
write(byte[] b) |
void |
write(byte[] b,
int offset,
int len) |
void |
writeByte(int v) |
void |
writeContinue()
Terminates the current record and starts a new
ContinueRecord (regardless
of how much space is still available in the current record). |
void |
writeContinueIfRequired(int requiredContinuousSize)
Will terminate the current record and start a new
ContinueRecord
if there isn't space for the requested number of bytes |
void |
writeDouble(double v) |
void |
writeInt(int v) |
void |
writeLong(long v) |
void |
writeShort(int v) |
void |
writeString(java.lang.String text,
int numberOfRichTextRuns,
int extendedDataSize)
Writes a unicode string complete with header and character data.
|
void |
writeStringData(java.lang.String text)
Writes the 'optionFlags' byte and encoded character data of a unicode string.
|
public ContinuableRecordOutput(LittleEndianOutput out, int sid)
public static ContinuableRecordOutput createForCountingOnly()
public int getTotalSize()
public int getAvailableSpace()
public void writeContinue()
ContinueRecord
(regardless
of how much space is still available in the current record).public void writeContinueIfRequired(int requiredContinuousSize)
ContinueRecord
if there isn't space for the requested number of bytesrequiredContinuousSize
- The number of bytes that need to be writtenpublic void writeStringData(java.lang.String text)
ContinueRecord
) from the
first chunk of character data it refers to.ContinueRecord
public void writeString(java.lang.String text, int numberOfRichTextRuns, int extendedDataSize)
Mask | Description |
---|---|
0x01 | is16bitEncoded |
0x04 | hasExtendedData |
0x08 | isRichText |
ContinueRecord
) from the
first chunk of character data (i.e. the first character is always encoded in the same
record as the string header).public void write(byte[] b)
write
in interface LittleEndianOutput
public void write(byte[] b, int offset, int len)
write
in interface LittleEndianOutput
public void writeByte(int v)
writeByte
in interface LittleEndianOutput
public void writeDouble(double v)
writeDouble
in interface LittleEndianOutput
public void writeInt(int v)
writeInt
in interface LittleEndianOutput
public void writeLong(long v)
writeLong
in interface LittleEndianOutput
public void writeShort(int v)
writeShort
in interface LittleEndianOutput
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.