use of org.h2.dev.util.ReaderInputStream in project h2database by h2database.
the class TestReader method test.
@Override
public void test() throws Exception {
String s = "\u00ef\u00f6\u00fc";
StringReader r = new StringReader(s);
InputStream in = new ReaderInputStream(r);
byte[] buff = IOUtils.readBytesAndClose(in, 0);
InputStream in2 = new ByteArrayInputStream(buff);
Reader r2 = IOUtils.getBufferedReader(in2);
String s2 = IOUtils.readStringAndClose(r2, Integer.MAX_VALUE);
assertEquals(s, s2);
}
Aggregations