Questions tagged [inputstreamreader]
216 questions
0
votes
2 answers
InputStreamReader(InputStreamReader(System.in,"ISO-8859-15")) reads "ő" as "õ"
First, I read from file. Reading is fine ő.
Then, I enter ő in console and if I compare them I got false. I want ő with console reading as well.
Edit: I use InputStream inp = new FileInputStream(file) for reading file.

junpet
- 87
- 3
- 14
0
votes
2 answers
"Disallowed Key Characters" error in json output
I'm trying to execute API and try to get json response, but I'm getting error as "Disallowed Key Characters" for bf.readLine().
Following is the code that I'm trying to use. But when I run the request url in web browser I'm getting response without…

dmaprasad
- 301
- 2
- 7
- 17
0
votes
0 answers
Reading URL is not works for every URL
I used following method to read a URL. It works fine for most of the URLs. But for some URL it gave an error.
As a example for http://www.brainyquote.com/quotes/keywords/father.html URL it gave an error as,
Exception in thread "main"…

Emalka
- 381
- 2
- 4
- 16
0
votes
1 answer
Using Buffered Reader to add user input to an array
I use a buffered reader to read in the input and then it adds it to an array. But for some reason it only adds the last input to the array. I also want to check if the first input is zero... so thats what I am doing with the check variable. But the…

Ryan C
- 3
- 1
- 3
0
votes
1 answer
How to read php echo from server via java without getting javascript needed page?
I got a java application which retrieves data from a server by reading the echo of an php script.
I am using this code:
String url = new UrlBuilder(URL)
.addParameter("option", "read")
.toString();
BufferedReader br =…

Error404
- 71
- 3
0
votes
2 answers
Java, reading input stream inside jButton actionperformed
I am trying to read an input stream of a process that I create inside an actionPerformed function of a JButton for my interface. For that purpose, I have implemented a runnable class. The problem is that I get an output stream in quantas, meaning…
0
votes
1 answer
BufferedReader readLine() waiting for ever reading from Process inputStream
I am reading the standardOutput from a Process using the common code to do it:
Process p = Runtime.getRuntime().exec("gradlew assembleRelease", null , new File(this.workDir));
BufferedReader input = new BufferedReader(new…

NullPointerException
- 36,107
- 79
- 222
- 382
0
votes
0 answers
Android: InputStreamReader .readLine method reading all lines instead of just one
I'm trying to read a txt file line by line, but it's sucking up the whole file into the first line. Is it my code, or perhaps the cr/lf encoding of the file itself?
try {
BufferedReader inputReader = new BufferedReader(new…

Todd
- 29
- 1
0
votes
1 answer
Getting latitude and longitude from address does not work (Error at InputStream)
I am trying to get the latitude and longitude of a place with the following code:
public LatLng findAddress(String place) {
try {
HttpURLConnection conn = null;
StringBuilder jsonResults = new StringBuilder();
…

levente
- 95
- 1
- 1
- 7
0
votes
0 answers
Why is an EOF character still appearing in my new file?
I am reading in multiple files and putting them all in to one new file. However for some reason when generating the new file there are EOF characters being inserted into the file.
This appears at the end of each line where the file…

tai
- 39
- 1
- 8
0
votes
5 answers
what are the fast ways to take input in java?
In Java i take Input using standard Scanner and BufferedReader Classes like:
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
or
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int…

Nikhil Pathania
- 812
- 6
- 19
0
votes
0 answers
Running BufferedReader multiple times in a thread
I am new to programming. Need just one program for my bachelors project.
I have a problem with running a thread in my program which uses buffered reader to save some data from an internet stream. When I run the thread for the first time everything…
0
votes
1 answer
Java URL Connection StreamReader issue reading results
When reading the reply after posting information to a webpage I am getting a strange issue. The console prints "success" but the check fails in the code and false is returned at the end instead of true when the check happens.
The php script for the…

James
- 110
- 9
0
votes
2 answers
Java inputstreamreader try block infinite loop
I have the code below in my server, and when I run it, it will read the input from my client only once and then break out of the try block, and ultimately end the while(true) loop.
public void run() {
while (true) {
try {
…

Pam
- 73
- 9
0
votes
1 answer
How to set timeout on InputStreamReader?
So I have this currently to do a HTTP request in Java:
HttpURLConnection connection = (HttpURLConnection)…
user3420034