}
protected MappedXMLStreamReader getXmlStreamReader(Reader reader)
throws JAXBException
{
MappedXMLStreamReader badger;
char[] buffer = new char[100];
StringBuffer buf = new StringBuffer();
BufferedReader bufferedReader = new BufferedReader(reader);
try
{
int wasRead = 0;
do
{
wasRead = bufferedReader.read(buffer, 0, 100);
if (wasRead > 0) buf.append(buffer, 0, wasRead);
} while (wasRead > -1);
badger = new MappedXMLStreamReader(new JSONObject(new JSONTokener(buf.toString())), convention);
}
catch (Exception e)
{
throw new JAXBException(e);
}