import java.util.*;
public class Main
{
public static void main(String[] args)
{
String fileName;
System.out.print("Enter the name of file to convert: ");
fileName = new Scanner(System.in).nextLine();
java.io.FileInputStream myFileReader = File.OpenRead(fileName);
long size = myFileReader.getLength();
byte[] data = new byte[size];
myFileReader.read(data, 0, (int)size);
myFileReader.close();
java.io.FileOutputStream myFileWriter = File.Create(fileName + ".inv");
for (long i = size - 1; i >= 0; i--)
{
myFileWriter.write(data[i]);
}
myFileWriter.close();
}
}