Make java 1.6 compatible

Signed-off-by: happymap <nafan628@gmail.com>
Signed-off-by: Yudi Fu <yudi.fu@turn.com>
Merge pull request #1 from turn/yfu/java6

Make java 1.6 compatible