Revise that write(DataOutputStream), byte[] toBytes().