inputstreamreader Questions

8

Solved

I want to type a multiple line text into the console using a BufferedReader and when I hit "Enter" to find the sum of the length of the whole text. The problem is that it seems I'm getting into an ...

4

Solved

I want to send a command to a server, and find out if I get a response. Right now i am using BufferedReader's readline() function, which blocks until there's a response from server, but all I want...
Trimetallic asked 30/6, 2012 at 11:41

2

Solved

The InputStream is passed as a parameter from somewhere, where it will be further processed and then closed. So I don't want to close the InputStream here. Consider the following code: void readIn...
Craniometry asked 6/4, 2019 at 12:52

3

Solved

I am studying Android development (I'm a beginner in programming in general) and learning about HTTP networking and saw this code in the lesson: private String readFromStream(InputStream inputStre...
Friedman asked 31/3, 2017 at 18:7

6

Solved

What is the difference between Java's BufferedReader and InputStreamReader classes?
Selfrighteous asked 11/9, 2011 at 6:15

6

Solved

I am reading data from a file that has, unfortunately, two types of character encoding. There is a header and a body. The header is always in ASCII and defines the character set that the body is e...
Coarsegrained asked 13/4, 2010 at 16:53

6

Solved

As I tentatively understand it at the moment: DataInputStream is an InputStream subclass, hence it reads and writes bytes. If you are reading bytes and you know they are all going to be ints or so...
Flammable asked 26/8, 2014 at 17:14

6

Solved

I want to ping a target IP address and receive a response. To achieve this, I'm using windows command line in Java with runtime.exec method and process class. I'm getting the response using inputSt...
Moidore asked 1/5, 2011 at 17:14

2

Solved

I have 8 files. Each one of them is about 1.7 GB. I'm reading those files into a byte array and that operation is fast enough. Each file is then read as follow: BufferedReader br=new BufferedRead...
Juvenescent asked 27/2, 2013 at 13:38

5

Solved

I have a method for my app to read a random line from a text file and return it. Im using the randTxt() to read and return a random line from the txt file. but it only shows the same line (1st line...
Glidebomb asked 2/1, 2012 at 19:57

2

Solved

I have some bytes which should be UTF-8 encoded, but which may contain a text is ISO8859-1 encoding, if the user somehow didn't manage to use his text editor the right way. I read the file with an...
Cumulonimbus asked 5/2, 2013 at 7:26

2

Solved

This piece of code is creating memory leak issues cause of BufferedReader and InputStreamReader which I think might be happening cause of some exceptions. How should I change it? try{ URL url = ...
Brune asked 30/8, 2012 at 14:25

2

I am reading in from a stream using a BufferedReader and InputStreamReader to create one long string that gets created from the readers. It gets up to over 100,000 lines and then throws a 500 error...
Theoretician asked 13/10, 2011 at 15:19

2

Solved

I am trying to read data from a binary stream, portions of which should be parsed as UTF-8. Using the InputStream directly for the binary data and an InputStreamReader on top of it for the U...
Wangle asked 30/6, 2011 at 7:2

3

Solved

I have some CLOB columns in a database that I need to put Base64 encoded binary files in. These files can be large, so I need to stream them, I can't read the whole thing in at once. I'm using org...
Infighting asked 30/5, 2010 at 1:4
1

© 2022 - 2024 — McMap. All rights reserved.