I just can't get this task
Please help
package com.codegym.task.task18.task1820;
/*
Rounding numbers
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String file1 = reader.readLine();
String file2 = reader.readLine();
FileInputStream fileInputStream = new FileInputStream(file1);
FileOutputStream fileOutputStream = new FileOutputStream(file2);
DataInputStream dataInputStream = new DataInputStream(fileInputStream);
while (dataInputStream.available()>0){
double d = dataInputStream.readDouble();
int i = (int)Math.round(d);
fileOutputStream.write(i);
if (dataInputStream.available()>0) {
int space = dataInputStream.readByte();
fileOutputStream.write(space);
}
}
reader.close();
fileInputStream.close();
fileOutputStream.close();
dataInputStream.close();
}
}