First, I need to read a binary String from file into memory - how ? To read I tried nio.CharBuffer, and then byte[]. But later I need to get a binary String with all possible binary data to do regular expression on, so it was not a success.
Then, I need to extract binary sequences from this binary string and save them in each separate binary file. Regular expr is something like this "some_string \0{4} \2.+?\0{10}", some_string followed by a space, then the \2 byte, then binary data and then 10 NULL bytes.
What would you recommend?