как сделать проверку последнего байта ? значение или индекс подразумевается под "нечетностью байта"?
public class Solution {
    public static void main(String[] args) {
        try (Scanner console = new Scanner(System.in);
             InputStream input = Files.newInputStream(Paths.get(console.nextLine()));
             OutputStream output = Files.newOutputStream(Paths.get(console.nextLine()))) {
            byte[] byteIn = input.readAllBytes();
            byte[] byteOut = new byte[byteIn.length];
            for (int i = 0; i < byteIn.length; i++)
                if () { //Если последний байт в byteIn нечетный
                    byteIn[i]=byteOut[i];
                } else {
                    byteOut[i] = byteIn[i];
                    byteIn[i] = byteIn[i + 1];
                    byteIn[i + 1] = byteOut[i];
                }
            OutputStream.write(byteOut);
        } catch (
                IOException e) {
            System.out.println("Something went wrong" + e);
        }
    }
}