This should avoid copying the ByteString into an extra array and wrapping it with ByteArrayInputStream and DataInputStream.