Reading MNIST dataset in java