Top "Bufferedreader" questions

Java class that reads text from a character-input stream, buffering characters so as to provide for an efficient reading of characters, arrays, and lines.

The constructor InputStreamReader(File) is undefined

import java.io.*; public class Streams { public static void main(String[] args) { File homedir = new File(System.getProperty("user.home")); …

java java-7 bufferedreader fileinputstream inputstreamreader
How can I make a copy of a BufferedReader?

I am using a BufferedReader constructor to make a new copy of an existing BufferedReader. BufferedReader buffReader = new BufferedReader(originalBuffReader); …

java io bufferedreader
BufferedReader not stating 'ready' when it should

I am trying to read text from a web document using a BufferedReader over an InputStreamReader on an URL (to …

java url bufferedreader
in what way is java.net.Socket threadsafe?

I have a Socket that I am both reading and writing to, via BufferedReaders and BufferedWriters. I'm not sure which …

java sockets thread-safety bufferedreader bufferedwriter
Read All Lines of BufferedReader in Scala into a String

How can I read all of a BufferedReader's lines and store into a String? val br = new BufferedReader(...) val str: …

scala bufferedreader
while loop with a readLine()

Here is my question: normal while loop looks like this - while(condition){statements} and statements execute until condition becomes …

java while-loop bufferedreader readline inputstreamreader
Reading any text file having strange encoding?

I have a text file with a strange encoding "UCS-2 Little Endian" that I want to read its contents using …

java text-files bufferedreader fileinputstream
How to clear/reset/open an input stream so it can be used in 2 different methods in Java?

Here's the code: package testpack; import java.io.*; public class InputStreamReadDemo { private void readByte() throws IOException { System.out.print("Enter …

java inputstream iostream bufferedreader system.in
Java 8 BufferedReader lines() method prints different count number

I have faced a problem to count line number using lines() method of BufferedReader. Following is the content of test.…

java lambda bufferedreader java-8
Java BufferedReader readline blocking?

I want to make an HTTP request and then get the response as sketched here: URLConnection c = new URL("http://…

java networking io blocking bufferedreader