1 21 package org.jacorb.orb.http.httpserver; 22 23 import java.io.*; 24 25 public class ServeOutputStream extends OutputStream 26 { 27 28 private PrintStream out; 29 private ServeConnection conn; 30 31 public ServeOutputStream( OutputStream out, ServeConnection conn ) 32 { 33 this.out = new PrintStream( out ); 34 this.conn = conn; 35 } 36 37 public void write( int b ) throws IOException 38 { 39 conn.writeHeaders(); 40 out.write( b ); 41 } 42 43 public void write( byte[] b, int off, int len ) throws IOException 44 { 45 conn.writeHeaders(); 46 out.write( b, off, len ); 47 } 48 49 public void flush() throws IOException 50 { 51 conn.writeHeaders(); 52 out.flush(); 53 } 54 55 public void close() throws IOException 56 { 57 conn.writeHeaders(); 58 out.close(); 59 60 } 61 62 public void print( String s ) throws IOException 63 { 64 conn.writeHeaders(); 65 out.print( s ); 66 } 67 68 public void print( int i ) throws IOException 69 { 70 conn.writeHeaders(); 71 out.print( i ); 72 } 73 74 public void print( long l ) throws IOException 75 { 76 conn.writeHeaders(); 77 out.print( l ); 78 } 79 80 public void println( String s ) throws IOException 81 { 82 conn.writeHeaders(); 83 out.println( s ); 84 } 85 86 public void println( int i ) throws IOException 87 { 88 conn.writeHeaders(); 89 out.println( i ); 90 } 91 92 public void println( long l ) throws IOException 93 { 94 conn.writeHeaders(); 95 out.println( l ); 96 } 97 98 public void println() throws IOException 99 { 100 conn.writeHeaders(); 101 out.println(); 102 } 103 104 } 105 106 107 108 109 110 111 | Popular Tags |