My Java TerrainMesh implementation. Java 8 is required as it uses Lambda expressions and functional APIs for modifying the mesh.
Currently lacking the mesh offset methods, but next to that it should have all the methods one needs to create something from it.
Use BlizzardInputStream to load TerrainMesh objects from files and BlizzardOutputStream to store TerrainMesh objects to files. This is done in the same was as standard Java Serialization, meaning create an input/output stream, wrap it in the appropriate ObjectInput/Output source (mentioned above) and then get/put an object in it. The stream will automatically resolve the object type from the file magic number but you will need to upward typecast to use it (same as normal Serialization). It is recommended to buffer the stream as it reads 1 field at a time (no automatic buffering).