stringreader

How to replace StringBufferInputStream with StringReader ?

Using JNLP, I have this line : File_Save_Service.saveFileDialog(null,null,new StringBufferInputStream("testing"),null); How to replace StringBufferInputStream with StringReader in this line ? The API for StringBufferInputStream says better use StringReader, but how to convert between different types ? ...

Tagsoup fails to parse html document from a StringReader ( java )

Hi I have this function: private Node getDOM(String str) throws SearchEngineException { DOMResult result = new DOMResult(); try { XMLReader reader = new Parser(); reader.setFeature(Parser.namespacesFeature, false); reader.setFeatur...

Using Android SAXParser, one my my XML Elements is mysteriously breaking in half.

And its not '&' Im using the SAXParser object do parse the actual XML. This is normally done by passing a URL to the XMLReader.Parse method. Because my XML is coming from a POST request to a webservice, I am saving that result as a String and then employing StringReader / InputSource to feed this string back to the XMLReader.Parse meth...

How to string multiple TextReaders together?

I have 3 TextReaders -- a combination of StreamReaders and StringReaders. Conceptually, the concatenation of them is a single text document. I want to call a method (not under my control) that takes a single TextReader. Is there any built-in or easy way to make a concatenating TextReader from multiple TextReaders? (I could write my o...

Ignoring specified encoding when deserializing XML

I am trying to read some XML received from an external interface over a socket. The problem is that the encoding is specified wrong in the XML-header (it says iso-8859-1, but it is utf-16BE). It is documented that the encoding is utf-16BE, but apparently they forgot to set the correct encoding. To ignore the encoding when I deserialize ...