datainputstream Questions

5

I am using DataInputStream to read some bytes from a socket. I have a expected number of bytes to read from the stream (after decoding a header, I know how many bytes are in the message) It works 9...
Mcpherson asked 12/1, 2011 at 20:56

4

Solved

I am on java 6. Using DataInputStream in = new DataInputStream(System.in); to read user input. When the readLine() is deprecated. What is the work around for reading user value? DataInputStream in...
Locular asked 10/4, 2011 at 11:17

3

Solved

Is there a way to ask a DataInputStream, if it has content to read? .readByte() will just hang it, waiting for a byte to be read :( Or do I always have to send a Dummy-Byte, to make sure it always ...
Tanny asked 19/1, 2014 at 12:2

4

I know that the resource you pass with a try, will be closed automatically if the resource has AutoCloseable implemented. So far so good. But what do I do when i have several resources that I want ...

3

Solved

Whenever I use HttpConnection Class in Java ME, Android or in BlackBerry, I uses DataInputStream/DataOutputStream class for reading & writing datas over remote server. However there are other c...
Barker asked 19/1, 2012 at 4:59

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

3

Solved

I'm cleaning up some chunks of our codebase at work, and one of the older classes is used to read and write data. This data is a mixture of US-ASCII encoded Strings and binary encoded primitives. ...
Tempi asked 4/7, 2012 at 15:14

4

Solved

I am trying to get input from user using DataInputStream. But this displays some junk integer value instead of the given value. Here is the code: import java.io.*; public class Sequence { public...
Premium asked 26/6, 2013 at 17:43

2

Solved

I have a Java applet that streams video (MJPEG) from a server. I wrote a proxy server in C# (Windows service) to put between the applet and multiple video servers. A HTML/CSS/Js frontend is used al...
Sandra asked 29/8, 2012 at 21:15

3

Solved

I have this code on the client side : DataInputStream dis = new DataInputStream(socketChannel.socket().getInputStream()); while(dis.available()){ SomeOtherClass.method(dis); } But available() k...
Lanoralanose asked 16/8, 2012 at 7:41

2

Solved

I was using UDP to send/receive data but I now want to switch to TCP to avoid packet loss. I've read several tutorials on TCP and noticed that instead of using DatagramPacket like UDP, TCP uses In...
Gibbous asked 20/7, 2012 at 23:14

5

Solved

What is the difference between FileInputStream fstream = new FileInputStream ("file1.txt"); BufferedReader br = new BufferedReader(new InputStreamReader(fstream)); and FileInputStream fstream...
Bisson asked 17/7, 2012 at 5:49

4

I have the following statement: DataInputStream is = new DataInputStream(process.getInputStream()); I would like to print the contents of this input stream but I dont know the size of this stream...
Bojorquez asked 19/9, 2011 at 18:32

2

Solved

I want to know what is the Java DataInputStream class equivalent in C#
Backlash asked 25/3, 2011 at 8:26

2

Solved

one question in the case for example of DataOutputStream output= new DataOutputStream(clientSocket.getOutputStream()) ; or DataInputStream in = new DataInputStream(clientSocket.getInputStrea...
Napiform asked 6/2, 2011 at 13:24
1

© 2022 - 2024 — McMap. All rights reserved.