Exception in Kaitai Struct Code " java.nio.BufferUnderflowException"

217 Views Asked by At

I very newer to kaitai-struct and java. i have parsed .ksy file to target language java,, but after compiling in eclipse ide i am getting " java.nio.BufferUnderflowException". can someone help me.

1

There are 1 best solutions below

0
On

BufferUnderflowException means that parsing has reached end of stream (or substream) at some point and attempted to went beyond it. It usually means that either:

  • your ksy file format spec is erroneous
  • the file you're trying to parse is corrupt and does not conform to the spec

Try running that spec against your file in some sort of visualization tool (i.e. WebIDE, ksv, etc) — it will most likely show you where the problem is.