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);
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);
Read data into buffer code example?
Reviewed by MCH
on
April 18, 2014
Rating:
No comments: