added license headers to Java API code