aboutsummaryrefslogtreecommitdiff
path: root/src/rejava/io/StringWriter.java
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2014-05-05 20:25:53 +0000
committerPacien TRAN-GIRARD2014-05-05 20:25:53 +0000
commitc67f1d95464d1d6c2854c59a920a2b3ea975df0f (patch)
treebf84b623ddec71edfbfc68f16d5530a3e11f7155 /src/rejava/io/StringWriter.java
parent0a87883db4d8e1728c1f520deda15e6e79ff1f01 (diff)
parentb8cafdd1c70b3fbb455ee6821c3dd0e5dc587188 (diff)
downloadesieequest-c67f1d95464d1d6c2854c59a920a2b3ea975df0f.tar.gz
Merge branch 'zuul-awesome' into 'master'
Zuul Awesome
Diffstat (limited to 'src/rejava/io/StringWriter.java')
-rw-r--r--src/rejava/io/StringWriter.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/rejava/io/StringWriter.java b/src/rejava/io/StringWriter.java
new file mode 100644
index 0000000..cee4c97
--- /dev/null
+++ b/src/rejava/io/StringWriter.java
@@ -0,0 +1,29 @@
1package rejava.io;
2
3/**
4 * A minimal subset of java.io.StringReader.
5 * (http://hg.openjdk.java.net/jdk7/jdk7/jdk/file
6 * /9b8c96f96a0f/src/share/classes/java/io/StringWriter.java)
7 *
8 * @author Pacien TRAN-GIRARD
9 */
10public class StringWriter extends Writer {
11
12 private final StringBuilder buf = new StringBuilder();
13
14 @Override
15 public void write(final String str) {
16 this.buf.append(str);
17 }
18
19 @Override
20 public void write(final char c) {
21 this.buf.append(c);
22 }
23
24 @Override
25 public String toString() {
26 return this.buf.toString();
27 }
28
29} \ No newline at end of file