It's not reversing the bytes but i've done everything correct but where is the problem BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); FileInputStream fis = new FileInputStream(br.readLine()); FileOutputStream fis1 = new FileOutputStream(br.readLine()); List<Byte> list = new LinkedList<>(); byte[] fuldata = new byte[fis.available()]; int data = fis.read(fuldata); list.add((byte)data); Collections.reverse(list); for(Byte n : list){ fis1.write(n); } fis1.close(); fis.close();