winstone.ajp13
Class Ajp13OutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by javax.servlet.ServletOutputStream
          extended by winstone.WinstoneOutputStream
              extended by winstone.ajp13.Ajp13OutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class Ajp13OutputStream
extends WinstoneOutputStream

Extends the winstone output stream, so that the ajp13 protocol requirements can be fulfilled.

Version:
$Id: Ajp13OutputStream.java,v 1.7 2007/05/05 00:52:50 rickknowles Exp $
Author:
mailto: Rick Knowles

Field Summary
 
Fields inherited from class winstone.WinstoneOutputStream
bodyOnly, buffer, bufferPosition, bufferSize, bytesCommitted, closed, committed, disregardMode, includeByteStreams, outStream, owner
 
Constructor Summary
Ajp13OutputStream(java.io.OutputStream outStream, java.lang.String headerEncoding)
           
 
Method Summary
 void commit()
           
 void finishResponse()
           
 byte[] getIntBlock(int integer)
          Useful generic method for getting ajp13 format integers in a packet.
 byte[] getStringBlock(java.lang.String text)
          Useful generic method for getting ajp13 format strings in a packet.
static void setIntBlock(int integer, byte[] packet, int offset)
          Useful generic method for setting ajp13 format integers in a packet.
 
Methods inherited from class winstone.WinstoneOutputStream
clearIncludeStackForForward, close, finishIncludeBuffer, flush, getBufferSize, getBytesCommitted, getOutputStreamLength, isCommitted, isIncluding, reset, setBufferSize, setClosed, setDisregardMode, setResponse, startIncludeBuffer, write, write
 
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
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ajp13OutputStream

public Ajp13OutputStream(java.io.OutputStream outStream,
                         java.lang.String headerEncoding)
Method Detail

commit

public void commit()
            throws java.io.IOException
Overrides:
commit in class WinstoneOutputStream
Throws:
java.io.IOException

finishResponse

public void finishResponse()
                    throws java.io.IOException
Overrides:
finishResponse in class WinstoneOutputStream
Throws:
java.io.IOException

getIntBlock

public byte[] getIntBlock(int integer)
Useful generic method for getting ajp13 format integers in a packet.


setIntBlock

public static void setIntBlock(int integer,
                               byte[] packet,
                               int offset)
Useful generic method for setting ajp13 format integers in a packet.


getStringBlock

public byte[] getStringBlock(java.lang.String text)
                      throws java.io.UnsupportedEncodingException
Useful generic method for getting ajp13 format strings in a packet.

Throws:
java.io.UnsupportedEncodingException


Copyright © 2013. All Rights Reserved.