I\'m trying to use a constant instead of a string literal in this piece of code:
new InputStreamReader(new FileInputStream(file), \"UTF-8\")
You can use Charset.defaultCharset() API or file.encoding property.
Charset.defaultCharset()
file.encoding
But if you want your own constant, you'll need to define it yourself.