Class InputStreamCharsetDetector


  • public class InputStreamCharsetDetector
    extends Object
    Charset detector for InputStream
    • Constructor Detail

      • InputStreamCharsetDetector

        public InputStreamCharsetDetector()
    • Method Detail

      • getCharset

        public static String getCharset​(InputStream stream,
                                        boolean withBOM)
        Tries to guess charset for given InputStream
        Parameters:
        stream - stream to get charset for, can be null
        withBOM - whether to add information about BOM presence
        Returns:
        charset name for give stream, can be null