1 2 24 25 26 27 28 29 package com.lutris.appserver.server.httpPresentation.servlet; 30 31 import java.io.IOException ; 32 33 import javax.servlet.ServletOutputStream ; 34 35 import com.lutris.appserver.server.httpPresentation.HttpPresentationIOException; 36 import com.lutris.appserver.server.httpPresentation.HttpPresentationOutputStream; 37 38 46 public class ServletHttpPresentationOutputStream 47 extends HttpPresentationOutputStream { 48 49 private ServletHttpPresentationResponse response; 50 private ServletOutputStream outputStream; 51 52 55 protected ServletHttpPresentationOutputStream(ServletHttpPresentationResponse response, 56 ServletOutputStream outputStream) { 57 this.response = response; 58 this.outputStream = outputStream; 59 } 60 61 65 public void print(String s) throws IOException { 66 try { 67 outputStream.print(s); 68 } catch (IOException except) { 69 throw new HttpPresentationIOException(except); 70 } 71 } 72 73 77 public void print(boolean b) throws IOException { 78 try { 79 outputStream.print(b); 80 } catch (IOException except) { 81 throw new HttpPresentationIOException(except); 82 } 83 } 84 85 89 public void print(char c) throws IOException { 90 try { 91 outputStream.print(c); 92 } catch (IOException except) { 93 throw new HttpPresentationIOException(except); 94 } 95 } 96 97 101 public void print(int i) throws IOException { 102 try { 103 outputStream.print(i); 104 } catch (IOException except) { 105 throw new HttpPresentationIOException(except); 106 } 107 } 108 109 113 public void print(long l) throws IOException { 114 try { 115 outputStream.print(l); 116 } catch (IOException except) { 117 throw new HttpPresentationIOException(except); 118 } 119 } 120 121 125 public void print(float f) throws IOException { 126 try { 127 outputStream.print(f); 128 } catch (IOException except) { 129 throw new HttpPresentationIOException(except); 130 } 131 } 132 133 137 public void print(double d) throws IOException { 138 try { 139 outputStream.print(d); 140 } catch (IOException except) { 141 throw new HttpPresentationIOException(except); 142 } 143 } 144 145 149 public void println() throws IOException { 150 try { 151 outputStream.println(); 152 } catch (IOException except) { 153 throw new HttpPresentationIOException(except); 154 } 155 } 156 157 161 public void println(String s) throws IOException { 162 try { 163 outputStream.println(s); 164 } catch (IOException except) { 165 throw new HttpPresentationIOException(except); 166 } 167 } 168 169 173 public void println(boolean b) throws IOException { 174 try { 175 outputStream.println(b); 176 } catch (IOException except) { 177 throw new HttpPresentationIOException(except); 178 } 179 } 180 181 185 public void println(char c) throws IOException { 186 try { 187 outputStream.println(c); 188 } catch (IOException except) { 189 throw new HttpPresentationIOException(except); 190 } 191 } 192 193 197 public void println(int i) throws IOException { 198 try { 199 outputStream.println(i); 200 } catch (IOException except) { 201 throw new HttpPresentationIOException(except); 202 } 203 } 204 205 209 public void println(long l) throws IOException { 210 try { 211 outputStream.println(l); 212 } catch (IOException except) { 213 throw new HttpPresentationIOException(except); 214 } 215 } 216 217 221 public void println(float f) throws IOException { 222 try { 223 outputStream.println(f); 224 } catch (IOException except) { 225 throw new HttpPresentationIOException(except); 226 } 227 } 228 229 233 public void println(double d) throws IOException { 234 try { 235 outputStream.println(d); 236 } catch (IOException except) { 237 throw new HttpPresentationIOException(except); 238 } 239 } 240 241 244 public void write(int b) throws IOException { 245 try { 246 outputStream.write(b); 247 } catch (IOException except) { 248 throw new HttpPresentationIOException(except); 249 } 250 } 251 252 public void write(byte b[]) throws IOException { 253 try { 254 outputStream.write(b); 255 } catch (IOException except) { 256 throw new HttpPresentationIOException(except); 257 } 258 } 259 260 public void write(byte b[], int off, int len) throws IOException { 261 try { 262 outputStream.write(b, off, len); 263 } catch (IOException except) { 264 throw new HttpPresentationIOException(except); 265 } 266 } 267 268 public void flush() throws IOException { 269 try { 270 outputStream.flush(); 271 } catch (IOException except) { 272 throw new HttpPresentationIOException(except); 273 } 274 } 275 276 } 278 | Popular Tags |