No really protocol as such, just commands sent to the camera that can make the camera do various things. If the camera supports PTP then it the software almost controls the camera remotely. Or tell the camera to do things that are not really built into the camera firmware but is possible via direct commands (which PTP seems to be)
http://en.wikipedia.org/wiki/Picture_Transfer_Protocol
Some cameras are better supported than others,which is why most people seem to develop for those that have full support then try to add support for camera that offer some support
My Nikon D3100 is a camera that has 'some' PTP support but not as easy as others that have full support such as the Nikon D7000 and above, or the Canon equivalents
There is commercial software that fully supports PTP, but not 'low end DSLR' such as the D3100. In their opinion anyway .... even Nikon don't really offer much support or drivers but it is possible to control a lot of it remotely
I have managed to track down a c# to java converter, but I'll have to see what that achives
The c# library is really a 'gateway' to the Nikon SDK that covers the Nikon PTP, but even seasoned programmers say its far from easy to access but the c# library accesses all the functions via fairly simple commands and parameters without having to recreate the wheel just to access the SDK fully