Change Serializer to use DataInputStream and DataOutputStream instead of
InputStream and OutputStream respectively.