-
Reading Large Binary Files for String Operations
I am attempting to read in very large binary files to execute some brute force
string operations on. All I am trying to do is extract a string from a known
(or semi-known) position within the binary file. I can find the last index
of the word "Title" within the fileand read out the text just BEFORE it,
until it hits a non-printable character (char<32).
On smaller files, this works absolutely beautifully. On larger (or more
complex) files, it gets a little weird. I don't think I'm getting the entire
contents of the file. I'm reading everything directly from the file into
a StringBuffer through a looping "readLine()" call (which GREATLY increased
my read time), but to do a "lastIndexOf" I have to do a "toString()" on the
StringBuffer (which is where I think it might be getting concatenated).
Does anyone have any pointers on reading large files and executing string
operations on them? Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks