public class Main { /** * @param args the command line arguments */ public static void main(String[] args) throws FileNotFoundException, IOException { int i = 0; int asc; String text; File status = new File("textfil.krypt"); char [] tabb = new char[(int)status.length()]; FileReader las = new FileReader("textfil.krypt"); FileWriter skriv = new FileWriter("textfil.txt"); Timer t = new Timer(); long start = System.nanoTime(); las.read(tabb); for(i = 0; i < tabb.length; i++) { tabb[i]--; } skriv.write(tabb); long stop = System.nanoTime(); las.close(); skriv.close(); System.out.println("Dekrypteringen tog " + (stop - start) + " nanosekunder"); } }