1
14
15 package com.liferay.util.bridges.jsf.sun;
16
17 import java.io.IOException;
18 import java.io.Writer;
19
20
25 public class WriterWrapper extends Writer {
26
27 public WriterWrapper(Writer writer) {
28 _writer = writer;
29 }
30
31 public void close() throws IOException {
32 _writer.close();
33 }
34
35 public void flush() {
36 }
37
38 public void write(char cbuf) throws IOException {
39 _writer.write(cbuf);
40 }
41
42 public void write(char[] cbuf, int off, int len) throws IOException {
43 StringBuilder sb = new StringBuilder(len);
44
45 sb.append(cbuf, off, len);
46
47 _writer.write(sb.toString());
48 }
49
50 public void write(int c) throws IOException {
51 _writer.write(c);
52 }
53
54 public void write(String str) throws IOException {
55 _writer.write(str);
56 }
57
58 public void write(String str, int off, int len) throws IOException {
59 _writer.write(str, off, len);
60 }
61
62 private Writer _writer;
63
64 }