1 16 17 package org.apache.coyote.tomcat4; 18 19 import java.io.IOException ; 20 21 import javax.servlet.ServletOutputStream ; 22 23 29 final class CoyoteOutputStream 30 extends ServletOutputStream { 31 32 33 35 36 protected OutputBuffer ob; 37 38 39 41 42 protected CoyoteOutputStream(OutputBuffer ob) { 43 this.ob = ob; 44 } 45 46 47 49 50 public void write(int i) 51 throws IOException { 52 ob.writeByte(i); 53 } 54 55 56 public void write(byte[] b) 57 throws IOException { 58 write(b, 0, b.length); 59 } 60 61 62 public void write(byte[] b, int off, int len) 63 throws IOException { 64 ob.write(b, off, len); 65 } 66 67 68 71 public void flush() 72 throws IOException { 73 ob.flush(); 74 } 75 76 77 public void close() 78 throws IOException { 79 ob.close(); 80 } 81 82 83 85 86 public void print(String s) 87 throws IOException { 88 ob.write(s); 89 } 90 91 92 } 93 94 | Popular Tags |