我正在使用Kaitai-Struct解析Java中的大型PCAP文件。每当文件大小超过Integer.MAX_VALUE字节数时,我就面临IllegalArgumentException由基础的大小限制引起的问题ByteBuffer。
I haven't found references to this issue elsewhere, which leads me to believe that this is not a library limitation but a mistake in the way I'm using it.
Since the problem is caused by trying to map the whole file into the ByteBuffer I'd think that the solution would be mapping only the first region of the file, and as the data is being consumed map again skipping the data already parsed. …