Switched internals from DataInput/DataOutput to InputStream/OutputStream