From 809ee375dabdca61451ed3f16e8a946b43fd9322 Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Thu, 29 Oct 2020 12:31:56 +0100 Subject: [PATCH] Added stream getters --- src/main/java/Main/Connection.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/Main/Connection.java b/src/main/java/Main/Connection.java index eec8199..02c2f57 100644 --- a/src/main/java/Main/Connection.java +++ b/src/main/java/Main/Connection.java @@ -11,7 +11,6 @@ import java.io.PrintWriter; import java.net.ConnectException; import java.net.ServerSocket; import java.net.Socket; -import java.net.UnknownHostException; public class Connection { private static final Logger logger = LogManager.getLogger(App.class); @@ -50,4 +49,12 @@ public class Connection { out = new PrintWriter(clientSocket.getOutputStream(), true); in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); } + + public PrintWriter getOut() { + return out; + } + + public BufferedReader getIn() { + return in; + } }