Added stream getters

This commit is contained in:
Marcin Kostrzewski 2020-10-29 12:31:56 +01:00
parent 4f5800cba9
commit 809ee375da

View File

@ -11,7 +11,6 @@ import java.io.PrintWriter;
import java.net.ConnectException; import java.net.ConnectException;
import java.net.ServerSocket; import java.net.ServerSocket;
import java.net.Socket; import java.net.Socket;
import java.net.UnknownHostException;
public class Connection { public class Connection {
private static final Logger logger = LogManager.getLogger(App.class); private static final Logger logger = LogManager.getLogger(App.class);
@ -50,4 +49,12 @@ public class Connection {
out = new PrintWriter(clientSocket.getOutputStream(), true); out = new PrintWriter(clientSocket.getOutputStream(), true);
in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
} }
public PrintWriter getOut() {
return out;
}
public BufferedReader getIn() {
return in;
}
} }