supporting DataInputStream and DataOutputStream