diff --git a/src/fr/devinsy/util/StringListWriter.java b/src/fr/devinsy/util/StringListWriter.java index 378dbe7..bf9842d 100755 --- a/src/fr/devinsy/util/StringListWriter.java +++ b/src/fr/devinsy/util/StringListWriter.java @@ -49,6 +49,34 @@ public class StringListWriter extends Writer } + /* + * + */ + @Override + public String toString() + { + String result; + + result = this.out.toString(); + + // + return result; + } + + /** + * + * @return + */ + public StringList toStringList() + { + StringList result; + + result = this.out; + + // + return result; + } + /* * */ @@ -63,7 +91,21 @@ public class StringListWriter extends Writer @Override public void write(final char[] cbuf, final int off, final int len) throws IOException { - this.out.append(cbuf.toString().substring(off, len)); + char[] target; + if ((off == 0) && (cbuf.length == len)) + { + target = cbuf; + } + else + { + target = new char[len]; + for (int index = off; index < len; index++) + { + target[index] = cbuf[index]; + } + } + + this.out.append(target.toString()); } /*