mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
18 lines
402 B
Java
18 lines
402 B
Java
|
package java.io;
|
||
|
|
||
|
public class StringWriter extends Writer {
|
||
|
private final StringBuilder out = new StringBuilder();
|
||
|
|
||
|
public void write(char[] b, int offset, int length) throws IOException {
|
||
|
out.append(new String(b, offset, length));
|
||
|
}
|
||
|
|
||
|
public String toString() {
|
||
|
return out.toString();
|
||
|
}
|
||
|
|
||
|
public void flush() throws IOException { }
|
||
|
|
||
|
public void close() throws IOException { }
|
||
|
}
|