Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 07:10 AM
Craig Petty
Guest
 
Posts: n/a
Default Any parser can handle 2.1GB+ file?

Well, I tried to use SAX to process a large document. However, we are
hitting an unfortunate limit in the xerces sax parser. I wish they
had used longs or unsigned ints (see below, which is throwing a
runtime exception) to keep track of the position in the document.
Atleast I'm guessing thats whats happening here.

Any ideas?


(from a utils class is xerces)
221 public int addString(int offset, int length) {
222 int chunk = offset >> CHUNK_SHIFT;
223 if (chunk != fChunk) {
224 if (fPreviousChunk == null)
225 throw new RuntimeException(new
ImplementationMessages().createMessage(null,
ImplementationMessages.INT_PCN, 0, null));
226 return fPreviousChunk.addString(offset, length);
227 }
228 int lastChunk = (offset + length - 1) >> CHUNK_SHIFT;
229 if (chunk == lastChunk) {
230 addRef();
231 return fStringPool.addString(this, offset &
CHUNK_MASK, length);
232 }
233 String str = toString(offset & CHUNK_MASK, length);
234 return fStringPool.addString(str);
235 }

here's the java stack trace...

java.lang.RuntimeException: Internal Error: fPreviousChunk == NULL
at org.apache.xerces.framework.XMLParser.parse(Unknow n Source)
at org.apache.xerces.framework.XMLParser.parse(Unknow n Source)
at Test.main(Test.java:177)
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles