org.mortbay.http.ajp
Class AJP13OutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.mortbay.util.ByteBufferOutputStream
          extended by org.mortbay.http.BufferedOutputStream
              extended by org.mortbay.http.ajp.AJP13OutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, HttpMessage.HeaderWriter

public class AJP13OutputStream
extends BufferedOutputStream

OutputStream for AJP13 protocol.

Version:
$Revision: 1.14 $
Author:
Greg Wilkins (gregw)

Field Summary
 
Fields inherited from class org.mortbay.http.BufferedOutputStream
_httpMessageWriter, _out
 
Fields inherited from class org.mortbay.util.ByteBufferOutputStream
_buf
 
Method Summary
protected  void bypassWrite(byte[] b, int offset, int length)
           
 void close()
           
 void destroy()
           
 void end()
           
 void flush()
          This implementation calls the commitObserver on the first flush since construction or reset.
 void resetStream()
           
protected  void wrapBuffer()
          Wrap Buffer.
 void write(AJP13Packet packet)
           
 void writeHeader(HttpMessage httpMessage)
           
 void writeTo(java.io.OutputStream out)
           
 
Methods inherited from class org.mortbay.http.BufferedOutputStream
getBypassBuffer, getCommitObserver, getOutputStream, isCommitted, setBypassBuffer, setCommitObserver, write, write
 
Methods inherited from class org.mortbay.util.ByteBufferOutputStream
bufferSize, capacity, ensureCapacity, ensureReserve, ensureSize, ensureSize, ensureSpareCapacity, isFixed, postReserve, postwrite, postwrite, preReserve, prewrite, prewrite, prewrite, reset, setFixed, size, spareCapacity, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

writeHeader

public void writeHeader(HttpMessage httpMessage)
                 throws java.io.IOException
Specified by:
writeHeader in interface HttpMessage.HeaderWriter
Overrides:
writeHeader in class BufferedOutputStream
Throws:
java.io.IOException

write

public void write(AJP13Packet packet)
           throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Description copied from class: BufferedOutputStream
This implementation calls the commitObserver on the first flush since construction or reset.

Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class BufferedOutputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class BufferedOutputStream
Throws:
java.io.IOException

resetStream

public void resetStream()
Overrides:
resetStream in class BufferedOutputStream

destroy

public void destroy()
Overrides:
destroy in class BufferedOutputStream

end

public void end()
         throws java.io.IOException
Throws:
java.io.IOException

wrapBuffer

protected void wrapBuffer()
                   throws java.io.IOException
Description copied from class: BufferedOutputStream
Wrap Buffer. Called by flush() to allow the data in the buffer to be pre and post written for any protocol wrapping. The default implementation does nothing.

Overrides:
wrapBuffer in class BufferedOutputStream
Throws:
java.io.IOException

bypassWrite

protected void bypassWrite(byte[] b,
                           int offset,
                           int length)
                    throws java.io.IOException
Overrides:
bypassWrite in class BufferedOutputStream
Throws:
java.io.IOException

writeTo

public void writeTo(java.io.OutputStream out)
             throws java.io.IOException
Overrides:
writeTo in class ByteBufferOutputStream
Throws:
java.io.IOException


Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.