Here you can find the source of getReader(InputStream in, String charsetName)
public static BufferedReader getReader(InputStream in, String charsetName) throws IOException
//package com.java2s; import java.io.*; import java.nio.charset.Charset; public class Main { public static BufferedReader getReader(InputStream in, String charsetName) throws IOException { return getReader(in, Charset.forName(charsetName)); }// w w w.j a v a 2 s. com public static BufferedReader getReader(InputStream in, Charset charset) throws IOException { if (null == in) { return null; } InputStreamReader reader = null; if (null == charset) { reader = new InputStreamReader(in); } else { reader = new InputStreamReader(in, charset); } return new BufferedReader(reader); } }