Fix for big strings

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/branches/REL_2_BRANCH@353398 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason Height 2003-10-14 07:53:07 +00:00
parent 269a7434d0
commit 2ef26b5ff5

View File

@ -426,10 +426,14 @@ class SSTDeserializer
int charsRead = calculateCharCount( dataLengthInBytes );
LittleEndian.putShort( unicodeStringData, (byte) 0, (short) charsRead );
arraycopy( record, 0, unicodeStringData, LittleEndianConsts.SHORT_SIZE, record.length );
UnicodeString ucs = new UnicodeString( UnicodeString.sid, (short) unicodeStringData.length, unicodeStringData );
UnicodeString ucs = new UnicodeString( UnicodeString.sid, (short) unicodeStringData.length, unicodeStringData, unfinishedString);
unfinishedString = unfinishedString + ucs.getString();
setContinuationCharsRead( charsRead );
unfinishedString = ucs.getString();
setContinuationCharsRead( getContinuationCharsRead() + charsRead );
if (getContinuationCharsRead() == charCount) {
Integer integer = new Integer( strings.size() );
addToStringTable( strings, integer, ucs );
}
}
private boolean stringSpansContinuation( int continuationSizeInBytes )