View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.module.cxf.support;
8   
9   import java.io.IOException;
10  import java.io.OutputStream;
11  
12  public class DelegatingOutputStream extends OutputStream
13  {
14      private OutputStream outputStream;
15  
16  
17      public DelegatingOutputStream(OutputStream outputStream)
18      {
19          super();
20          this.outputStream = outputStream;
21      }
22      
23      public OutputStream getOutputStream()
24      {
25          return outputStream;
26      }
27  
28      public void setOutputStream(OutputStream outputStream)
29      {
30          this.outputStream = outputStream;
31      }
32  
33      public void close() throws IOException
34      {
35          outputStream.close();
36      }
37  
38      public boolean equals(Object obj)
39      {
40          return outputStream.equals(obj);
41      }
42  
43      public void flush() throws IOException
44      {
45          outputStream.flush();
46      }
47  
48      public int hashCode()
49      {
50          return outputStream.hashCode();
51      }
52  
53      public String toString()
54      {
55          return outputStream.toString();
56      }
57  
58      public void write(byte[] b, int off, int len) throws IOException
59      {
60          outputStream.write(b, off, len);
61      }
62  
63      public void write(byte[] b) throws IOException
64      {
65          outputStream.write(b);
66      }
67  
68      public void write(int b) throws IOException
69      {
70          outputStream.write(b);
71      }
72      
73  }
74  
75