WebBox Klassenbibliothek
ulrich@undisclosed
2020-05-28 bf412a896b52694891bc4b72dee092e026f6e667
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;
541b28 24 import javax.servlet.WriteListener;
c0f5a3 25 //import javax.servlet.WriteListener;
bc9f6a 26
U 27 /**
28  *
29  * @author ulrich
30  */
31 public class FilterServletOutputStream extends ServletOutputStream {
32  
33   private DataOutputStream stream; 
34  
35   public FilterServletOutputStream(OutputStream output) { 
36     stream = new DataOutputStream(output); 
37   }
38  
39   public void write(int b) throws IOException  { 
40     stream.write(b); 
41   }
42  
43   public void write(byte[] b) throws IOException  { 
44     stream.write(b); 
45   }
46  
47   public void write(byte[] b, int off, int len) throws IOException  { 
48     stream.write(b,off,len); 
49   } 
8771a5 50
c0f5a3 51     //@Override
8771a5 52     public boolean isReady() {
U 53         // was ist hier zu tun...
54         return true;
55     }
56
c0f5a3 57     //@Override
U 58     //public void setWriteListener(WriteListener writeListener) {
8771a5 59         // was ist hier zu tun..
c0f5a3 60     //}
541b28 61
U 62     @Override
63     public void setWriteListener(WriteListener wl) {
64         // TODO: Implement
65     }
bc9f6a 66  
U 67 }