Here you can find the source of makeUTF8Reader(InputStream inputStream)
Parameter | Description |
---|---|
inputStream | the underlying input stream. |
public static Reader makeUTF8Reader(InputStream inputStream)
//package com.java2s; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.nio.charset.Charset; public class Main { /** The UTF-8 Charset. */ public static final Charset UTF_8_CHARSET = Charset.forName("UTF-8"); /**//from w w w . j av a 2 s . c om * Constructs a new Reader based on the UTF-8 encoding. * @param inputStream the underlying input stream. * @return a corresponding Reader. */ public static Reader makeUTF8Reader(InputStream inputStream) { return new InputStreamReader(inputStream, UTF_8_CHARSET); } }