Java DataOutputStream ClassJava DataOutputStream class allows an application to write primitive Java data types to the output stream in a machine-independent way. Java application generally uses the data output stream to write data that can later be read by a data input stream. Java DataOutputStream class declarationLet's see the declaration for java.io.DataOutputStream class: Java DataOutputStream class methods
Example of DataOutputStream classIn this example, we are writing the data to a text file testout.txt using DataOutputStream class. Output: Succcess... testout.txt: A Next TopicJava DataInputStream Class |