poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31906] New: - [PATCH] "Pull" method for handeling continue records
Date Tue, 26 Oct 2004 22:30:26 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31906>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31906

[PATCH] "Pull" method for handeling continue records

           Summary: [PATCH] "Pull" method for handeling continue records
           Product: POI
           Version: 2.5
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: jheight@subcorp.com.au


Hi All,

I have been performing some experiments with automatic
handling of Continue records.

It seems to me that the current method of handling
Continue records is to detect that a Continue records
is required, store enough state to pick up after the
Continue record is Pushed down to the record by the
RecordFactory and start again. This makes for
complicated classes ie SST.

A number of records that contain strings, and
conceivably could exceed the record limits but do not
implement the current Continue mechanisms. I notice
that the recent drawing code does not implement
continue records (AbstractEscherHolderRecord),
probably because in the current implementation it is
so damned hard to do.

What I have created  a "RecordInputStream", that knows
enough about continue records so that each record can
pull data from this class. It will even automatically
transition ove a continue record boundary so that the
low level records can just keep sucking bytes so long
as there are continue records available.

This is a big patch because I have had to touch every single
HSSF Record constructor and fillFields method, and in
some cases ie SST rewrite them.

*** But look how simple SST deserialisation now is!! ***

I plan eventually to have a RecordOutputStream which
will do the serialization.

At this stage it is working great!

I would appreciate any comments on the patch before i commit it. 

Glen:/ You could consider wrapping a ddf aware input stream over the top of this
stream in AbstractEscherHolderRecord.fillFields eg

DDFInputStream inStr = new DDFInputStream(recordInputStream);

Thanks

Jason

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org


Mime
View raw message