I have a Fixed length file, it is a large file with millions of records. The length of the record in each line is 19. In each line 12th character corresponds to a particular status for which I need to get the count of each status in the file. Eg:
XXXXXXXXXXX**1**XXXXXXXXX
XXXXXXXXXXX**2**XXXXXXXXX
XXXXXXXXXXX**3**XXXXXXXXX
XXXXXXXXXXX**4**XXXXXXXXX
I need to do get the count of lines with 1 in 12th character of line, 2,3, and 4.
I'm using java as programming language.