Wraps an existing OutputStream and writes big-endian typed data to it. Typically, this stream can be read in by DataInputStream. Types that can be written include byte, 16-bit short, 32-bit int, 32-bit float, 64-bit long, 64-bit double, byte strings, and MUTF-8 encoded strings.
1. In the MainActivity.java file, add the below import to the imports section.
import java.io.DataOutputStream;
2. In the onCreate method, add the below line to declare a new DataOutputStream named myDataOutputStream.
DataOutputStream myDataOutputStream;
3. Compile and run!
Next Recommended Article: How to Initialize a DataOutputStream
Resources:
http://developer.android.com/reference/java/io/DataOutputStream.html
http://android-er.blogspot.com/2011/01/simple-communication-using.html
Next Recommended Article: How to Initialize a DataOutputStream
Resources:
http://developer.android.com/reference/java/io/DataOutputStream.html
http://android-er.blogspot.com/2011/01/simple-communication-using.html