switch to non-deprecated JavaWriter methods
inlined
Merge pull request #307 from sgoldfed/eliminatewarnings

switch to non-deprecated JavaWriter methods