Package net.htmlparser.jericho
Class CharStreamSourceUtil
- java.lang.Object
-
- CharStreamSourceUtil
-
public final class CharStreamSourceUtil extends java.lang.ObjectContains static utility methods for manipulating the way data is retrieved from aCharStreamSourceobject.See the documentation of the
CharStreamSourceclass for details.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.io.ReadergetReader(CharStreamSource charStreamSource)Returns aReaderthat reads the output of the specifiedCharStreamSource.static java.lang.StringtoString(CharStreamSource charStreamSource)Returns the output of the specifiedCharStreamSourceas a string.
-
-
-
Method Detail
-
getReader
public static java.io.Reader getReader(CharStreamSource charStreamSource)
Returns aReaderthat reads the output of the specifiedCharStreamSource.The current implementation of this method simply returns
new StringReader(toString(charStreamSource)), but a future version may implement this method in a more memory efficient manner.- Parameters:
charStreamSource- the character stream source producing the output.- Returns:
- a
Readerthat reads the output of the specifiedCharStreamSource.
-
toString
public static java.lang.String toString(CharStreamSource charStreamSource)
Returns the output of the specifiedCharStreamSourceas a string.The current implementation of this method simply returns
new StringReader(toString(charStreamSource)), but a future version may implement this method in a more memory efficient manner, for example by utilising a temporary file.- Parameters:
charStreamSource- the character stream source producing the output.- Returns:
- the output of the specified
CharStreamSourceas a string.
-
-