Initialize the ByteArrayInputStream with the correct size (saves
allocations/copies)