Program using datainputstream in java




















React Native. Python Design Patterns. Python Pillow. Python Turtle. Verbal Ability. Interview Questions. Company Questions. Artificial Intelligence. Cloud Computing. Data Science. Angular 7. Machine Learning. Data Structures. Operating System. Computer Network. Compiler Design. Computer Organization. Discrete Mathematics. Ethical Hacking. It contains only a single constructor that accepts an InputStream as a parameter. The below example uses the read method of the DataInputStream class to read the data from the input file.

We can check the available number of bytes to read using the available method. The below example demonstrates the various read methods to read data from the file using the DataInputStream class.

The readUFT method is for reading the Unicode format data, readInt method for integer value, readChar for character data, readBoolean for boolean value, readDouble for double data, readFloat for float value and readLong for long value. There are corresponding write methods in the DataOutputStream class to write these values which we will see in detail in the next tutorial.

React Native. Python Design Patterns. Python Pillow. Python Turtle. Verbal Ability. Interview Questions. Company Questions. Artificial Intelligence. Cloud Computing. Data Science. Angular 7. Machine Learning. Data Structures.



0コメント

  • 1000 / 1000