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!
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center