@@ -0,0 +1,1067 @@
+package com.greensnow25.NetworkFileManager.LIbrery.Classes;%0A%0Aimport com.greensnow25.NetworkFileManager.LIbrery.Interfaces.ActionWithFile;%0A%0Aimport java.io.*;%0Aimport java.net.Socket;%0A%0Apublic class UploadFile implements ActionWithFile %7B%0A    @Override%0A    public void makeAction(File filePath, Socket socket, long lenght, String answer) throws IOException %7B%0A        BufferedInputStream bis = null;%0A%0A        try %7B%0A            bis = new BufferedInputStream(new FileInputStream(filePath));%0A          //  BufferedInputStream bisSocket = new BufferedInputStream(socket.getInputStream());%0A           DataOutputStream boutSocket = new DataOutputStream(socket.getOutputStream());%0A            int len;%0A            byte%5B%5D buffer = new byte%5B2048%5D;%0A%0A%0A            while ((len = bis.read(buffer)) != -1) %7B%0A                boutSocket.write(buffer, 0, len);%0A%0A                if (len == (int) lenght) %7B%0A                    break;%0A%0A                %7D%0A                boutSocket.flush();%0A            %7D%0A%0A%0A        %7D catch (Exception ex) %7B%0A            ex.printStackTrace();%0A        %7D%0A%0A%0A    %7D%0A%7D%0A

Update date 13.03.17