@@ -0,0 +1,977 @@
+package ru.agolovin;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.io.RandomAccessFile;%0A%0A/**%0A * File sort class.%0A *%0A * @author agolovin (agolovin@list.ru)%0A * @version $Id$%0A * @since 0.1%0A */%0Apublic class FileSort %7B%0A%0A    private String lineSeparator = System.getProperty(%22lineSeparator%22);%0A%0A    public void sort(File source, File distance) throws IOException %7B%0A        try %7B%0A            RandomAccessFile rafSource = new RandomAccessFile(source, %22r%22);%0A            RandomAccessFile rafDistance = new RandomAccessFile(distance, %22rw%22);%0A%0A            String line = rafSource.readLine();%0A            if (line != null) %7B%0A                rafDistance.writeBytes(line);%0A            %7D%0A            while ((line = rafSource.readLine()) != null) %7B%0A                rafDistance.writeBytes(String.format(%22%25s%25s%22, lineSeparator, line));%0A            %7D%0A        %7D%0A        catch (IOException ioe) %7B%0A            System.err.println(%22ioe%22);%0A%0A        %7D%0A    %7D%0A%7D%0A

add pre task 3