Package net.htmlparser.jericho
Class CharStreamSourceUtil
java.lang.Object
CharStreamSourceUtil
Contains static utility methods for manipulating the way data is retrieved from a
CharStreamSource
object.
See the documentation of the CharStreamSource
class for details.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Reader
getReader
(CharStreamSource charStreamSource) Returns aReader
that reads the output of the specifiedCharStreamSource
.static String
toString
(CharStreamSource charStreamSource) Returns the output of the specifiedCharStreamSource
as a string.
-
Method Details
-
getReader
Returns aReader
that 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
Reader
that reads the output of the specifiedCharStreamSource
.
-
toString
Returns the output of the specifiedCharStreamSource
as 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
CharStreamSource
as a string.
-