How to Initialize a DataInputStream

DataInputStream was added in API Level 1
Wraps an existing InputStream and reads big-endian typed data from it. Typically, this stream has been written by a DataOutputStream. Types that can be read include byte, 16-bit short, 32-bit int, 32-bit float, 64-bit long, 64-bit double, byte strings, and strings encoded in modified UTF-8.

1. Declare a DataInputStream named myDataInputStream.

2. In the file, in the onCreate method, add the line below. This will initialize the myDataInputStream object to null.

myDataInputStream = null;

3. Compile and run!