FileDocCategorySizeDatePackage
CoyoteOutputStream.javaAPI DocGlassfish v2 API5365Fri May 04 22:32:42 BST 2007org.apache.coyote.tomcat5

CoyoteOutputStream

public class CoyoteOutputStream extends ServletOutputStream
Coyote implementation of the servlet output stream.
author
Costin Manolache
author
Remy Maucherat

Fields Summary
private static final org.apache.catalina.util.StringManager
sm
The string manager for this package.
protected OutputBuffer
ob
Constructors Summary
public CoyoteOutputStream(OutputBuffer ob)



    // ----------------------------------------------------------- Constructors


    // BEGIN S1AS 6175642
    /*
    protected CoyoteOutputStream(OutputBuffer ob) {
    */
       
    // END S1AS 6175642
        this.ob = ob;
    
Methods Summary
voidclear()
Clear facade.

        ob = null;
    
protected java.lang.Objectclone()
Prevent cloning the facade.

        throw new CloneNotSupportedException();
    
public voidclose()

        // Disallow operation if the object has gone out of scope
        if (ob == null) {
            throw new IllegalStateException(
                sm.getString("object.invalidScope"));
        }

        ob.close();
    
public voidflush()
Will send the buffer to the client.

        // Disallow operation if the object has gone out of scope
        if (ob == null) {
            throw new IllegalStateException(
                sm.getString("object.invalidScope"));
        }

        ob.flush();
    
public voidprint(java.lang.String s)

        // Disallow operation if the object has gone out of scope
        if (ob == null) {
            throw new IllegalStateException(
                sm.getString("object.invalidScope"));
        }

        ob.write(s);
    
public voidwrite(int i)

        // Disallow operation if the object has gone out of scope
        if (ob == null) {
            throw new IllegalStateException(
                sm.getString("object.invalidScope"));
        }

        ob.writeByte(i);
    
public voidwrite(byte[] b)

        // Disallow operation if the object has gone out of scope
        if (ob == null) {
            throw new IllegalStateException(
                sm.getString("object.invalidScope"));
        }

        write(b, 0, b.length);
    
public voidwrite(byte[] b, int off, int len)

        // Disallow operation if the object has gone out of scope
        if (ob == null) {
            throw new IllegalStateException(
                sm.getString("object.invalidScope"));
        }

        ob.write(b, off, len);