I\'m trying to use a constant instead of a string literal in this piece of code:
new InputStreamReader(new FileInputStream(file), \"UTF-8\")
In Java 1.7+
Do not use "UTF-8" string, instead use Charset type parameter:
Charset
import java.nio.charset.StandardCharsets ... new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8);