Top "Datainputstream" questions

A DataInputStream lets an application read primitive Java data types from an underlying input stream in a machine-independent way.

DataInputStream deprecated readLine() method

I am on java 6. Using DataInputStream in = new DataInputStream(System.in); to read user input. When the readLine() is deprecated. …

java user-input readline datainputstream
Close multiple resources with AutoCloseable (try-with-resources)

I know that the resource you pass with a try, will be closed automatically if the resource has AutoCloseable implemented. …

java sockets datainputstream try-with-resources autocloseable
Reading Integer user input in DataInputStream in java?

I am trying to get input from user using DataInputStream. But this displays some junk integer value instead of the …

java datainputstream
Reading a .dat file into an array in Java

The code that I'm writing has two classes: writeInts and readInts. I wrote writeInts to randomly generate 100 numbers between 0 and 1000 …

java arrays datainputstream dataoutputstream
Java, need a while loop to reach eof. i.e.while !eof, keep parsing

I currently have a working parser. It parses a file once(not what I want it to do) and then …

java while-loop eof datainputstream
How to remove first 4 bytes from a byte array in Java?

I have a byte array named byteArr[].I need to remove first 4 bytes from it.My code is shown below. …

java arrays bytearray datainputstream
Reading from a URL Connection Java

I'm trying to read html code from a URL Connection. In one case the html file I'm trying to read …

java url html-parsing urlconnection datainputstream
Getting byte arrays using TCP connections

I was using UDP to send/receive data but I now want to switch to TCP to avoid packet loss. …

java tcp udp datainputstream
deprecated readLine() What to change?

I'm a Java beginner, trying to get this to work in Eclipse. However, the readLine is struck through and a …

java httpurlconnection datainputstream
Java: Difference with dis.read() and dis.readUTF() in DataInputStream

Simple Question. What is Difference with dis.read() and dis.readUTF()? For example, dis.read() only read to byte array, …

java sockets serversocket datainputstream