@@ -0,0 +1,1874 @@
+import java.net.*;%0D%0Aimport java.io.*;%0D%0A%0D%0Apublic class ServerTcpListener %7B%0D%0A%0D%0A    public static void main(String%5B%5D args) %7B%0D%0A%0D%0A        try %7B%0D%0A            final ServerSocket server = new ServerSocket();%0D%0A            server.bind(new InetSocketAddress(%220.0.0.0%22, 4242));%0D%0A%0D%0A            while (true) %7B%0D%0A                try %7B%0D%0A                    System.out.println(%22Start...%22);%0D%0A                    Socket socket = server.accept();%0D%0A                    System.out.println(%22Success%22);%0D%0A                    receiveFile(socket);%0D%0A%0D%0A                %7D catch (Exception e) %7B%0D%0A                %7D%0D%0A            %7D%0D%0A        %7D%0D%0A%0D%0A        catch (Exception e) %7B%0D%0A            e.printStackTrace();%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A    public void run() %7B%0D%0A    %7D%0D%0A%0D%0A    public static void receiveFile(Socket socket) %7B%0D%0A%0D%0A        byte%5B%5D inputByte = null;%0D%0A        int length = 0;%0D%0A        DataInputStream dis = null;%0D%0A        FileOutputStream fos = null;%0D%0A       %0D%0A            try %7B%0D%0A%0D%0A                dis = new DataInputStream(socket.getInputStream());%0D%0A                fos = new FileOutputStream(new File(%22C:%5C%5CUsers%5C%5CWill%5C%5CDesktop%5C%5Caaabbb.PNG%22));%0D%0A                inputByte = new byte%5B1024 * 4%5D;%0D%0A                System.out.println(%22Receiving...%22);%0D%0A                while ((length = dis.read(inputByte, 0, inputByte.length)) %3E 0) %7B%0D%0A                    fos.write(inputByte, 0, length);%0D%0A                    fos.flush();%0D%0A                %7D%0D%0A                System.out.println(%22Finish%22);%0D%0A%0D%0A%0D%0A                //return the result%0D%0A                String res = %22Finish%22;%0D%0A                OutputStream out = socket.getOutputStream();%0D%0A                out.write(res.getBytes());%0D%0A                //closing resources%0D%0A                socket.close();%0D%0A                dis.close();%0D%0A                fos.close();%0D%0A                out.close();%0D%0A            %7D catch (Exception e)%7Be.printStackTrace();%7D%0D%0A        %0D%0A    %7D%0D%0A%7D

Add server side code