BufferedReader class methods in Java

java.io.BufferedReader

Reads text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines. 

The buffer size may be specified, or the default size may be used. The default is large enough for most purposes.


Some methods of BufferedReader class


close()This method closes the stream and releases any system resources associated with it.


lines()This method returns a Stream, the elements of which are lines read from this BufferedReader.


mark(int)This method marks the present position in the stream.


markSupported()This method tells whether this stream supports the mark() operation, which it does.


read(char[], int, int)This method reads characters into a portion of an array.


readLine()This method reads a line of text.


ready()This method tells whether this stream is ready to be read.


reset()This method resets the stream to the most recent mark.


skip(long)This method skips characters.


No comments:

Post a Comment