commit | author | age
|
bc9f6a
|
1 |
/* |
U |
2 |
WebBox - Dein Server. |
|
3 |
Copyright (C) 2017 Ulrich Hilger, http://uhilger.de |
|
4 |
|
|
5 |
This program is free software: you can redistribute it and/or modify |
|
6 |
it under the terms of the GNU Affero General Public License as |
|
7 |
published by the Free Software Foundation, either version 3 of the |
|
8 |
License, or (at your option) any later version. |
|
9 |
|
|
10 |
This program is distributed in the hope that it will be useful, |
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
GNU Affero General Public License for more details. |
|
14 |
|
|
15 |
You should have received a copy of the GNU Affero General Public License |
|
16 |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 |
*/ |
|
18 |
package de.uhilger.wbx.web; |
|
19 |
|
|
20 |
import java.io.DataOutputStream; |
|
21 |
import java.io.IOException; |
|
22 |
import java.io.OutputStream; |
|
23 |
import javax.servlet.ServletOutputStream; |
|
24 |
|
|
25 |
/** |
|
26 |
* |
|
27 |
* @author ulrich |
|
28 |
*/ |
|
29 |
public class FilterServletOutputStream extends ServletOutputStream { |
|
30 |
|
|
31 |
private DataOutputStream stream; |
|
32 |
|
|
33 |
public FilterServletOutputStream(OutputStream output) { |
|
34 |
stream = new DataOutputStream(output); |
|
35 |
} |
|
36 |
|
|
37 |
public void write(int b) throws IOException { |
|
38 |
stream.write(b); |
|
39 |
} |
|
40 |
|
|
41 |
public void write(byte[] b) throws IOException { |
|
42 |
stream.write(b); |
|
43 |
} |
|
44 |
|
|
45 |
public void write(byte[] b, int off, int len) throws IOException { |
|
46 |
stream.write(b,off,len); |
|
47 |
} |
|
48 |
|
|
49 |
} |