Here you can find the source of isCharsetSupported()
true
if charsets are supported in this JRE.
static boolean isCharsetSupported() throws IOException
//package com.java2s; import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import java.util.zip.ZipFile; public class Main { /**//www. j a v a 2 s . c o m * Returns <code>true</code> if charsets are supported in this JRE. */ static boolean isCharsetSupported() throws IOException { try { ZipFile.class.getConstructor(new Class[] { File.class, Charset.class }); return true; } catch (NoSuchMethodException e) { return false; } } }