R
Ryan Tan via JavaKB.com
Hi there, does anyone have a quick way to search for a byte pattern in a binary file?
Ie. I have a byte[] with a series of byte values and I want to locate the occurances of this pattern in a binary file.
The only way I figure so far is to read the binary file with a reasonable sized byte[] (buffer) and manually comparing it byte by byte. This will take a long time and there is complication in data that crosses two buffers (two reads).
Thank you in advance. I'm so glad I discovered this forum today.
_____________________
Message posted via http://www.javakb.com
Ie. I have a byte[] with a series of byte values and I want to locate the occurances of this pattern in a binary file.
The only way I figure so far is to read the binary file with a reasonable sized byte[] (buffer) and manually comparing it byte by byte. This will take a long time and there is complication in data that crosses two buffers (two reads).
Thank you in advance. I'm so glad I discovered this forum today.
_____________________
Message posted via http://www.javakb.com