public JAXMStreamSource(Reader rdr) throws IOException { CharWriter cout = new CharWriter(); char[] temp = new char[1024]; int len; while (-1 != (len = rdr.read(temp))) cout.write(temp, 0, len); this.reader = new CharReader(cout.getChars(), cout.getCount()); }