Fix for big strings

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353399 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason Height 2003-10-14 07:57:10 +00:00
parent dc44a8bd39
commit f7a6f8320c

View File

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