This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
The HAT and VisualVM tools from Sun both parse HPROF files, and the source code is available for both of them. jhat can be found in tools.jar in Sun JDKs. If the license is acceptable to you, you could use either one of them in your project and save some work. See: