Class Client
- java.lang.Object
-
- tk.doraneko.tcp.sendfile.largefile.Client
-
public class Client extends Object
- Since:
- 14/10/2019
- Author:
- tranphuquy19@gmail.com
-
-
Field Summary
Fields Modifier and Type Field Description private DataInputStream
dataInputStream
private DataOutputStream
dataOutputStream
private String
host
private int
MAX_LENGTH_SEND
private int
port
private Socket
socket
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
void
sendFile(String filePath)
private void
start()
-
-
-
Field Detail
-
socket
private Socket socket
-
dataOutputStream
private DataOutputStream dataOutputStream
-
dataInputStream
private DataInputStream dataInputStream
-
MAX_LENGTH_SEND
private final int MAX_LENGTH_SEND
- See Also:
- Constant Field Values
-
host
private String host
-
port
private int port
-
-
Constructor Detail
-
Client
public Client(String host, int port) throws IOException
- Throws:
IOException
-
-
Method Detail
-
start
private void start() throws IOException
- Throws:
IOException
-
sendFile
public void sendFile(String filePath) throws IOException
- Throws:
IOException
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
-