The output file you generate via your code is going to be a single column since you're using the println method, use print and delimit with the \t or space or whatever the original file has for consistencies sake.
As for your array issues, inputting values into an array is very easy:
Code:
0,0 0,1 0,2
1,0 1,1 1,2
2,0 2,1 2,2
These are the values you'd use for the accessing the specific element of the array. So to assign the first value you'd use: array[0][0]=value;
With this in mind, if you do want to construct that 2D array you'll need to do a know the integer values to insert the 0|1 at, so think about how you could map the reading to array areas. If you are allowed to modify your input file then just include the height and width of the array in the first line and use those two values to create and then assign values to your array.