I came across the sum.misc.Unsafe class when reading the implementation of ForkJoinPool. But no source code or api docs were found in the JDK.
Where can I find the source code or api docs for the sun.misc.*
While such code is available (see Binyamin's post) it is generally a very bad idea to write anything that needs such code.
First, you are not generally assured that any JVM has such a class available (only JVMs descending from SUN's codebase would contain non-published, non-standard, SUN specific libraries). Also, since these are not standard libraries, you can't really depend on them being present or unchanged in subsequent releases of the SUN JVM.