List of usage examples for java.io FilterWriter flush
public void flush() throws IOException
From source file:Main.java
public static void main(String[] args) throws Exception { Writer w = new StringWriter(6); FilterWriter fw = new FilterWriter(w) { };//w w w .j av a2 s . c om fw.write(65); fw.flush(); String s = w.toString(); System.out.print(s); }