Questions tagged [inputstreamreader]
216 questions
1
vote
2 answers
Program doing overwriting
I am making a program that accepts 10 strings and send them to a text file. But, my problem is that it is just overwriting any previous values present in the file. Any ideas how to prevent it overwriting?
My program is as follows:
import…

user2987896
- 13
- 2
1
vote
1 answer
How to save and retrieve InputStream in text file with less overhead
I am retrieving/downloading JSON feed as InputStreamReader and I need to pass this InputStreamReader to JsonReader for parsing it.
JsonReader reader = new JsonReader(isr); // isr is the InputStreamReader instance
Everything is okay. But I want to…

Kaidul
- 15,409
- 15
- 81
- 150
1
vote
1 answer
Strange behaviour of readline in Java/Scala
I got a very strange problem. I am trying to read the result of a command I am executing. The code never reaches the println-Statement. It is just "hanging up" the program, if the end of the output is reached. No failure and no exception.
My project…

user2363125
- 23
- 2
1
vote
1 answer
Using TCP + AsyncTask To Keep Connection Open and Listening for Data Being Sent From Server
Hi Stackoverflow members! Heres my issue...
1) Connect To a TCP Server *CHECK
2) Send the Initial Packet & Receive from Server (VB.NET) *CHECK
NOW MY ISSUE
I'm trying to keep my connection alive, and continue to listen for incoming data. I tried…

Ruben Pizarro
- 73
- 9
1
vote
4 answers
Access file from another package
My situation is as following : I have package packA where I have classA, and I have a file.txt in packB.resources. In classA I'm using this to access file.txt :
InputStreamReader in = new InputStreamReader(new…

Adil
- 4,503
- 10
- 46
- 63
1
vote
3 answers
Which is better solution get server response data?
We usually get data from server response in android development.
/*
* get server response inputStream
*/
InputStream responseInputStream;
Solution1: get response string by multiple read.
/*
* get server response string
*/
…

boiledwater
- 10,372
- 4
- 37
- 38
1
vote
3 answers
InputStreamReader encoder
My problem is fairly simple:
new InputStreamReader(is, "UTF-8");
Makes β and ・look like question marks.
Which encoder should I use to see those characters correctly?

Charlie-Blake
- 10,832
- 13
- 55
- 90
0
votes
0 answers
android, when using bufferedReader, is using StringBuilder better than using readText() read in whole text
When read in a file from android asset folder, is there performance difference if use bufferedReader.readLine() with StringBuilder to read line by line, or use bufferedReader.readText() to read in all?
bufferedReader.readLine()
fun…

lannyf
- 9,865
- 12
- 70
- 152
0
votes
1 answer
Javafx Tableview with InputStreamReader removes row color marker
i can't get any further. I have a standart Tableview and inserted the part from James_D which gives me a colored row and a different colored selected cell
see here.
This works realy pretty good. Now i need to read the data from an internet…

Uwe
- 3
- 4
0
votes
1 answer
Is there a way to avoid the "hit enter key" when reading lines from stdin using BufferedReader?
The following is a simple but fully working Java program that demonstrates my issue:
package bufferedreader_test;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class BufferedReaderTest {
…

WebViewer
- 761
- 7
- 21
0
votes
1 answer
How to load a tsv file for MALLET using FileInputStream in Java?
I want to load the flat text file passed in as 'TMFlatFile' (which is the .tsv file format to use in MALLET) into into the fileReader variable.
I have created the method, RunTopicModelling() and am having a problem with the try/except block.
I have…

Bluetail
- 1,093
- 2
- 13
- 27
0
votes
1 answer
Process Builder printing the output without any sysout, i want to store the output in List
I want to store the list of folders with name ending with MS present at PROJECT_LOCATION in a List ===>
ProcessBuilder processBuilder = new ProcessBuilder().directory(Paths.get(PROJECT_LOCATION)
.toFile())
.command("cmd.exe",
…

Akshat Sharma
- 3
- 1
0
votes
0 answers
Why is InputStreamReader not ready to read data (I am relatively new to java networking so this is probably a simple issue)
I am having some trouble with Input Stream reader as its never ready to receive data from my client script
This is my server side code (There are a lot of variables and things that are not used but there going to be implemented later) also I…

Oside
- 1
0
votes
0 answers
InputStream from a URL failed for specific URL
trying to get the conetnt of site when calling URL.
url=https://seekingalpha.com/symbol/AAPL/dividends/scorecard
in browser - it is working !
from java code i get:
Your current browser configurationis not compatible with this site.
my code:…

Div4u
- 1
0
votes
1 answer
HTTP URL request is successful but StringBuilder response returns null
[Java] My HTTP request is using the URL's openStream() method to read and pull the contents of the URL. My servlet is able to access the URL successfully and is also successfully traversing through the content inside the while loop. However, the…

Kali Linux
- 13
- 5