Class StreamUtil
- java.lang.Object
-
- com.day.cq.wcm.designimporter.util.StreamUtil
-
public class StreamUtil extends 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 String
getEncoding(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
-
-
-
Method Detail
-
getEncoding
public static String getEncoding(InputStream stream) throws 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:
IOException
-
-