use of java.io.FilterWriter in project guava by google.
the class TestCharSink method openStream.
@Override
public Writer openStream() throws IOException {
// using TestByteSink's output stream to get option behavior, so flush to it on every write
return new FilterWriter(new OutputStreamWriter(byteSink.openStream(), UTF_8)) {
@Override
public void write(int c) throws IOException {
super.write(c);
flush();
}
@Override
public void write(char[] cbuf, int off, int len) throws IOException {
super.write(cbuf, off, len);
flush();
}
@Override
public void write(String str, int off, int len) throws IOException {
super.write(str, off, len);
flush();
}
};
}
use of java.io.FilterWriter in project j2objc by google.
the class OldFilterWriterTest method test_ConstructorLjava_io_Writer.
public void test_ConstructorLjava_io_Writer() {
FilterWriter myWriter = null;
called = true;
try {
myWriter = new MyFilterWriter(null);
fail("NullPointerException expected.");
} catch (NullPointerException e) {
// expected
}
}
use of java.io.FilterWriter in project robovm by robovm.
the class OldFilterWriterTest method test_ConstructorLjava_io_Writer.
public void test_ConstructorLjava_io_Writer() {
FilterWriter myWriter = null;
called = true;
try {
myWriter = new MyFilterWriter(null);
fail("NullPointerException expected.");
} catch (NullPointerException e) {
// expected
}
}
Aggregations