preon

Parsing variable record lengths in Preon

I'm trying to use Preon to parse binary files, which are structured as a sequence of variable length records. For each record, there's a number which specifies the record length (in bytes). Here's a simplified version of what I'm trying to do: package test.preon; import nl.flotsam.preon.annotation.BoundList; import nl.flotsam.preon....

Signed und Unsigned Integers in Preon

I want to use Preon for project that communicates with a server written in C. The protocol depends on the native endianess of the machine (you can solve with thisjava.nio.ByteOrder.getNative() under the assumption that the JVM has the same endianess as the server) and uses uint64_t for data lenghts and int32_t for status codes (a negativ...