diff options
author | Nick Burch <nick@apache.org> | 2010-01-19 12:02:10 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2010-01-19 12:02:10 +0000 |
commit | 9780245c0831f832cbbbe1b0c743e2eda2e09662 (patch) | |
tree | 41861725c47235489611f151686ddfa00af6fe04 /src | |
parent | 398b457631b0a586a317aeb6f23298f7a9582316 (diff) | |
download | poi-9780245c0831f832cbbbe1b0c743e2eda2e09662.tar.gz poi-9780245c0831f832cbbbe1b0c743e2eda2e09662.zip |
Add more documentation, and make the constructor public for testing use
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@900744 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/poi/hssf/record/cont/ContinuableRecordOutput.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/java/org/apache/poi/hssf/record/cont/ContinuableRecordOutput.java b/src/java/org/apache/poi/hssf/record/cont/ContinuableRecordOutput.java index 26946c7cca..0f85139a3d 100644 --- a/src/java/org/apache/poi/hssf/record/cont/ContinuableRecordOutput.java +++ b/src/java/org/apache/poi/hssf/record/cont/ContinuableRecordOutput.java @@ -35,7 +35,7 @@ public final class ContinuableRecordOutput implements LittleEndianOutput { private UnknownLengthRecordOutput _ulrOutput; private int _totalPreviousRecordsSize; - ContinuableRecordOutput(LittleEndianOutput out, int sid) { + public ContinuableRecordOutput(LittleEndianOutput out, int sid) { _ulrOutput = new UnknownLengthRecordOutput(out, sid); _out = out; _totalPreviousRecordsSize = 0; @@ -73,6 +73,11 @@ public final class ContinuableRecordOutput implements LittleEndianOutput { _totalPreviousRecordsSize += _ulrOutput.getTotalSize(); _ulrOutput = new UnknownLengthRecordOutput(_out, ContinueRecord.sid); } + /** + * Will terminate the current record and start a new {@link ContinueRecord} + * if there isn't space for the requested number of bytes + * @param requiredContinuousSize The number of bytes that need to be written + */ public void writeContinueIfRequired(int requiredContinuousSize) { if (_ulrOutput.getAvailableSpace() < requiredContinuousSize) { writeContinue(); |