Add classes for processing in Java and more tests/samples

Added some utility classes and test/samples for use in java.