Method available from the code is added

API method can be used from java code directly
Merge pull request #2 from solomax/patch-2

Method available from the code is added