when meeting the text content, its true, but can't pass, idk where is wrong
public class Solution {
    public static void main(String... args) throws IOException {
        String path = args[0];
        int position = Integer.parseInt(args[1]);
        String text = args[2];

        RandomAccessFile raf = new RandomAccessFile(path, "rw");
        byte[] arr = new byte[raf.length()];

        try {
            raf.seek(position);
            raf.read(arr, 0, text.length());

            raf.seek(raf.length());

            if(new String(arr).equals(text))
                raf.write("true".getBytes());
            else
                raf.write("false".getBytes());
            raf.close();
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }
}