Ad Code

Read data into buffer code example?


Read data into buffer code example?

For reading data from socket
As stated above, a socket has input stream attached to it.
InputStream is = s.getInputStream();
// now to convert byte oriented stream into character oriented buffered reader
// we use intermediary stream that helps in achieving above stated purpose
InputStreamReader isr= new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
Reactions

Post a Comment

0 Comments