001
014
015 package com.liferay.portal.kernel.io.unsync;
016
017 import java.io.IOException;
018 import java.io.OutputStream;
019
020
027 public class UnsyncFilterOutputStream extends OutputStream {
028
029 public UnsyncFilterOutputStream(OutputStream outputStream) {
030 this.outputStream = outputStream;
031 }
032
033 public void close() throws IOException {
034 try {
035 flush();
036 }
037 catch (IOException ioe) {
038 }
039
040 outputStream.close();
041 }
042
043 public void flush() throws IOException {
044 outputStream.flush();
045 }
046
047 public void write(byte[] byteArray) throws IOException {
048 outputStream.write(byteArray, 0, byteArray.length);
049 }
050
051 public void write(byte[] byteArray, int offset, int length)
052 throws IOException {
053
054 outputStream.write(byteArray, offset, length);
055 }
056
057 public void write(int b) throws IOException {
058 outputStream.write(b);
059 }
060
061 protected OutputStream outputStream;
062
063 }