Merge pull request #2155 from jonasmalacofilho/development

[java] Catch end of file on stdin
[java] Add @:keep to Resource.content; it was lost during DCE if only getString and getBytes were used