scan txt file without save it in a string

Is it possibile to scan a txt file on a URL (like a httpclient) without save it in a string?
Is it possible to use .substring, .remove etc directly in the file without copy the file on a string?

I need to scan the the file and searching for a specifically string. And if I find it copy it in a string.

The txt file is like this (all the lines have the same number of characters):
B6:F0:AB:F3:76:33 010010
00:1B:2F:75:18:AC 000000
3E:E6:2B:41:76:46 010000
76:EA:A8:BD:CD:86 000003
3A:48:4C:3E:23:41 000010

Thanks