Changed public API, changed sink package, and added java unit test to ma...

...ke sure Java API is callable from Java.