Уже всю голову поломал, не проходит предпоследний пункт и все. подскажите ко может?
package com.javarush.task.task32.task3210;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
/*
Используем RandomAccessFile
*/
public class Solution {
public static void main(String... args) {
try {
RandomAccessFile raf = new RandomAccessFile(args[0], "rw");
int len = args[2].length();
int pos = Integer.parseInt(args[1]);
raf.seek(pos);
byte[] b = new byte[len];
raf.read(b,0,len);
raf.seek(raf.length());
if(!args[2].equals(b.toString())){
raf.write("false".getBytes());
}
else{
raf.write("true".getBytes());
}
}
catch(FileNotFoundException e){
}
catch(IOException e){
}
}
}