タイプ .dat のファイルを読み込もうとしています。ファイルのサイズはわかりませんが、内容が次の形式になることは知っています
111000111
0101
0100
1
0011
110
0010
101
0001
11
0000
現在私が持っているものは以下です
public static void readFile(String fileName) throws FileNotFoundException, IOException
{
    File file = new File(fileName);
    byte[] bytes = new byte[(int) file.length()];
    try (FileInputStream fis = new FileInputStream(file))
    {
        fis.read(bytes);
    }
    String[] value = new String(bytes).split("\\s+");
    numbers = new int[value.length];
    for (int i = 0; i < value.length; i++)
    {
        numbers[i] = Integer.parseInt(value[i]);
    }
    for (int i = 0; i < numbers.length; i++)
    {
        System.out.println(numbers[i]);
    }
} // end of import file 
ファイルの出力は以下のリストです。ご覧のとおり、数字が 0 (または倍数) で始まる場合、その数字は削除されます。
111000111
101
100
1
11
110
10
101
1
11
0
どんな助けでも大歓迎です。
よろしく、
マイク