Change DataInputStream and DataOutputStream to DataInput and DataOutput
respectively.