What is the use of DataInputStream and DataOutputStream in Java Networking ? I have done searching but i haven't found any good answer about this. Please Help !!
Asked
Active
Viewed 115 times
-1
-
1How about reading their javadoc? What don't you understand? – JB Nizet Sep 27 '17 at 16:13
-
Possible duplicate of [What's the difference between DataOutputStream and ObjectOutputStream?](https://stackoverflow.com/questions/11521027/whats-the-difference-between-dataoutputstream-and-objectoutputstream) – jrtapsell Sep 27 '17 at 16:19
-
Your question is totally unclear. Edit it and make it more precise what you really want to know. – JMax Oct 01 '17 at 16:26
1 Answers
-1
It is basically a simplified version of ObjectOutputStream, which can only write primative values.
This means it is good for writing simple values out, but ObjectOutputStream is better if you want to send structured or complex data.
The javadoc says this:
A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way. An application uses a data output stream to write data that can later be read by a data input stream.

jrtapsell
- 6,719
- 1
- 26
- 49
-
Could I get an explanation for the downvote, so I know what about my answer was not correct – jrtapsell Oct 01 '17 at 14:17