1796
|
1 package luan.impl;
|
|
2
|
|
3 import java.io.Writer;
|
|
4 import java.io.StringWriter;
|
|
5 import java.io.IOException;
|
|
6 import luan.Luan;
|
|
7 import luan.LuanException;
|
|
8 import luan.modules.IoLuan;
|
|
9
|
|
10
|
|
11 public final class LuanStringWriter implements IoLuan.LuanWriter {
|
|
12 private final Writer out = new StringWriter();
|
|
13
|
|
14 public Object out() {
|
|
15 return out;
|
|
16 }
|
|
17
|
|
18 public void write(Luan luan,Object... args) throws LuanException, IOException {
|
|
19 for( Object obj : args ) {
|
|
20 out.write( luan.luanToString(obj) );
|
|
21 }
|
|
22 }
|
|
23
|
|
24 public void close() {}
|
|
25 }
|