Class StreamUtil


  • public class StreamUtil
    extends java.lang.Object
    Class for stream related utility methods
    • Constructor Summary

      Constructors 
      Constructor Description
      StreamUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getEncoding​(java.io.InputStream stream)
      Determines the encoding in the passed html document stream by peeking into the <meta> tags or the xml declaration if it's an xhtml document
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StreamUtil

        public StreamUtil()
    • Method Detail

      • getEncoding

        public static java.lang.String getEncoding​(java.io.InputStream stream)
                                            throws java.io.IOException
        Determines the encoding in the passed html document stream by peeking into the <meta> tags or the xml declaration if it's an xhtml document
        Parameters:
        stream - The InputStream of the HTML document being imported
        Returns:
        The determined charset
        Throws:
        java.io.IOException