Kaitai Struct Code“java.nio.BufferUnderflowException”中的例外情况

时间:2018-01-31 12:51:04

标签: java exception hexdump stackunderflow kaitai-struct

我对kaitai-struct和java非常新。我已经解析了.ksy文件到目标语言java ,,但在eclipse中编译后我得到了“java.nio.BufferUnderflowException”。有人可以帮助我。

1 个答案:

答案 0 :(得分:0)

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.