001
014
015 package com.liferay.util.bridges.jsf.sun;
016
017 import java.io.IOException;
018 import java.io.Writer;
019
020
023 public class WriterWrapper extends Writer {
024
025 public WriterWrapper(Writer writer) {
026 _writer = writer;
027 }
028
029 public void close() throws IOException {
030 _writer.close();
031 }
032
033 public void flush() {
034 }
035
036 public void write(char cbuf) throws IOException {
037 _writer.write(cbuf);
038 }
039
040 public void write(char[] cbuf, int off, int len) throws IOException {
041 StringBuilder sb = new StringBuilder(len);
042
043 sb.append(cbuf, off, len);
044
045 _writer.write(sb.toString());
046 }
047
048 public void write(int c) throws IOException {
049 _writer.write(c);
050 }
051
052 public void write(String str) throws IOException {
053 _writer.write(str);
054 }
055
056 public void write(String str, int off, int len) throws IOException {
057 _writer.write(str, off, len);
058 }
059
060 private Writer _writer;
061
062 }