Data inputstream

109
-1

Published on

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
109
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Data inputstream

  1. 1. DataInputStream 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. DataInputStream
  2. 2. • 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. DataInputStream
  3. 3. • java.io.DataInputStream • public class DataInputStream extends InputStream implements DataInput DataInputStream
  4. 4. Constructor • DataInputStream(InputStream in) • Creates a DataInputStream and saves its argument, the input stream in, for later use. DataInputStream
  5. 5. readUTF() • Reads from the stream in a representation of a Unicode character string encoded in Java modified UTF-8 format; this string of characters is then returned as a String. The details of the modified UTF-8 representation are exactly the same as for the readUTF method of DataInput. • Parameters:in - a data input stream.Returns:a Unicode string. DataInputStream
  6. 6. Syntax readUTF() • public static final String readUTF(DataInput in) throws IOException DataInputStream

×