I would read the data straight into a direct ByteBuffer. You don't need a DataInputStream as well. I would have the ByteBuffer larger than needed e.g. 1 MB or 10 MB and use the fact that unused direct buffers (like unused native memory) only uses virtual memory, not real memory. I would make sure this buffer is re-used as much as possible, ideally for the life of the application.
In a 64-bit environment you can make the buffers really large. e.g. 1 GB without much impact.
If you want to minimise memory consumption, I would process the data as you receive it. That way you avoid having to store it first. It sounds like the minimum size is 13 bytes and would make a reasonable buffer size like 512 bytes or 2 KB.