1 17 18 19 package org.apache.catalina.connector; 20 21 import java.io.IOException ; 22 23 import javax.servlet.ServletOutputStream ; 24 25 31 public class CoyoteOutputStream 32 extends ServletOutputStream { 33 34 35 37 38 protected OutputBuffer ob; 39 40 41 43 44 protected CoyoteOutputStream(OutputBuffer ob) { 45 this.ob = ob; 46 } 47 48 49 51 52 55 protected Object clone() 56 throws CloneNotSupportedException { 57 throw new CloneNotSupportedException (); 58 } 59 60 61 63 64 67 void clear() { 68 ob = null; 69 } 70 71 72 74 75 public void write(int i) 76 throws IOException { 77 ob.writeByte(i); 78 } 79 80 81 public void write(byte[] b) 82 throws IOException { 83 write(b, 0, b.length); 84 } 85 86 87 public void write(byte[] b, int off, int len) 88 throws IOException { 89 ob.write(b, off, len); 90 } 91 92 93 96 public void flush() 97 throws IOException { 98 ob.flush(); 99 } 100 101 102 public void close() 103 throws IOException { 104 ob.close(); 105 } 106 107 108 110 111 public void print(String s) 112 throws IOException { 113 ob.write(s); 114 } 115 116 117 } 118 119 | Popular Tags |