'Process a file line by line.
Args:
file_obj: The file to parse.
line_parser: The parser method used to process and store line content.
Raises:
parser.ParseError if the parser is unable to process the line.'

def _ParseFile(self, file_obj, line_parser):

    lines = [l.strip() for l in file_obj.read(100000).splitlines()]
    try:
        for (index, line) in enumerate(lines):
            if line:
                line_parser(line)
    except (IndexError, KeyError) as e:
        raise parsers.ParseError(('Invalid    file    at    line    %d:    %s' % ((index + 1), e)))
