Apache Tomcat 7.0.54

org.apache.coyote.http11.upgrade
Class AbstractServletOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by javax.servlet.ServletOutputStream
          extended by org.apache.coyote.http11.upgrade.AbstractServletOutputStream
All Implemented Interfaces:
Closeable, Flushable
Direct Known Subclasses:
AprServletOutputStream, BioServletOutputStream, NioServletOutputStream

public abstract class AbstractServletOutputStream
extends ServletOutputStream

Implements the new Servlet 3.1 methods for ServletOutputStream.


Field Summary
protected static StringManager sm
           
 
Constructor Summary
AbstractServletOutputStream()
           
 
Method Summary
 void close()
           
protected abstract  void doClose()
           
protected abstract  void doFlush()
           
protected abstract  int doWrite(boolean block, byte[] b, int off, int len)
          Abstract method to be overridden by concrete implementations.
protected  boolean isCloseRequired()
           
 boolean isReady()
          New Servlet 3.1 method.
protected  void onWritePossible()
           
 void setWriteListener(WriteListener listener)
          New Servlet 3.1 method.
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class javax.servlet.ServletOutputStream
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println
 
Methods inherited from class java.io.OutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sm

protected static final StringManager sm
Constructor Detail

AbstractServletOutputStream

public AbstractServletOutputStream()
Method Detail

isReady

public final boolean isReady()
New Servlet 3.1 method.


setWriteListener

public final void setWriteListener(WriteListener listener)
New Servlet 3.1 method.


isCloseRequired

protected final boolean isCloseRequired()

write

public void write(int b)
           throws IOException
Specified by:
write in class OutputStream
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class OutputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class OutputStream
Throws:
IOException

onWritePossible

protected final void onWritePossible()
                              throws IOException
Throws:
IOException

doWrite

protected abstract int doWrite(boolean block,
                               byte[] b,
                               int off,
                               int len)
                        throws IOException
Abstract method to be overridden by concrete implementations. The base class will ensure that there are no concurrent calls to this method for the same socket.

Throws:
IOException

doFlush

protected abstract void doFlush()
                         throws IOException
Throws:
IOException

doClose

protected abstract void doClose()
                         throws IOException
Throws:
IOException

Apache Tomcat 7.0.54

Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.