Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ResponseOutputStream |
|
| 1.0;1 |
1 | /* | |
2 | * $Id: ResponseOutputStream.java 19191 2010-08-25 21:05:23Z tcarlson $ | |
3 | * -------------------------------------------------------------------------------------- | |
4 | * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com | |
5 | * | |
6 | * The software in this package is published under the terms of the CPAL v1.0 | |
7 | * license, a copy of which has been included with this distribution in the | |
8 | * LICENSE.txt file. | |
9 | */ | |
10 | ||
11 | package org.mule; | |
12 | ||
13 | import java.io.BufferedOutputStream; | |
14 | import java.io.IOException; | |
15 | import java.io.OutputStream; | |
16 | import java.net.Socket; | |
17 | ||
18 | /** | |
19 | * <code>ResponseOutputStream</code> is an output stream associated with the | |
20 | * currently received event. Note that if the stream is from a socket the socket is | |
21 | * also available on this stream so that the socket state can be validated before | |
22 | * writing. | |
23 | */ | |
24 | ||
25 | public class ResponseOutputStream extends BufferedOutputStream | |
26 | { | |
27 | ||
28 | 0 | private Socket socket = null; |
29 | ||
30 | public ResponseOutputStream(OutputStream stream) | |
31 | { | |
32 | 0 | super(stream); |
33 | 0 | } |
34 | ||
35 | public ResponseOutputStream(Socket socket, OutputStream stream) throws IOException | |
36 | { | |
37 | 0 | super(stream); |
38 | 0 | this.socket = socket; |
39 | 0 | } |
40 | ||
41 | public Socket getSocket() | |
42 | { | |
43 | 0 | return socket; |
44 | } | |
45 | ||
46 | } |