Theres a nice site with the specs of all mdN mesh formats and some C code to load those meshes that could be translated to Java for people working on .md5 loaders. Just browse down until you see md5.
This is a very cool mesh format for animations. It is certainly much more stable and clean than the .x mess. It has a bonus that there are good quality importer/exporters for Blender here at the bottom of this page: