message could not be send to socket
i have a simple chat: server(starting first) and a client(sending message to server and receiving the same message).
In server and client i use
streams to communicate both in client and server.
DataInputStream in = new DataInputStream(socket.getInputStream());
DataOutputStream out = new DataOutputStream(socket.getOutputStream());
Code works fine, but when i change streams to
server stops in function read from socket and nothing happed.
BufferedReader in = new BufferedReader(new InputStreamReader( socket.getInputStream()));
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
Why does it happen ?