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

...ke sure Java API is callable from Java.
Formatting error. The style is 4 indent when constructor params are in the next lines.