• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Read and search text in HTML - ArrIndOutOfBoundsException: 88

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am searching text from HTML and finding file names. Placing those names to JList. Searching is taking place properly. but java.lang.ArrayIndexOutOfBoundsException: 88 is thrown.

Find the code below:


Please let me know why this exception occurs:


Thanks in advance,
Seema
 
Marshal
Posts: 79475
379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which line in that quoted code is throwing the Exception? I can't see any [] in your code.
 
Seema Sharma
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It show exception at line editorPane.read(reader, htmlDoc);
Please find the stack trace below:


Do i need to use HTMLEditorKit.Parser for reading. I tried using the parser.read() method, but shows errors. Tried the bow code:

when above code is used for reading HTML, search logic itself doesn't work and same java.lang.ArrayIndexOutOfBoundsException: 88 exception as above occurs, this time at parser.parse(reader, callback, true);

Thanks for reading. Any help is highly appreciated.

Regards,
Seema
 
Campbell Ritchie
Marshal
Posts: 79475
379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That doesn't help a lot; you haven't shown us which line is causing the Exception.
 
Seema Sharma
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Exception is shown at line editorPane.read(reader, htmlDoc);

Thanks in advace,
Seema
 
Campbell Ritchie
Marshal
Posts: 79475
379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
None of your code appears to contain any arrays in the first place. What are you passing to the editorPane?
 
Seema Sharma
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Campbell,
I am reading large number of HTML files, so exception may be because of that.
Same exception i found in the below link, but did not understand the solution.
Check URL

Please help in uderstanding it.

Thanks in advance,
Seema
 
Campbell Ritchie
Marshal
Posts: 79475
379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't know. Sorry. I couldn't understand the other thread either.
 
reply
    Bookmark Topic Watch Topic
  • New Topic