The Package Buffers API allows objects and data structures to be represented by descriptors but in a typesafe way. Objects are either contained within a modifiable buffer descriptor or are represented by pointer descriptors.
The package is templated, the template parameter being the type of the object represented. The use of a templated provides the required type safety.