org.mortbay.http.ajp

Class AJP13OutputStream

Implemented Interfaces:
HttpMessage.HeaderWriter

public class AJP13OutputStream
extends BufferedOutputStream

OutputStream for AJP13 protocol.
Version:
$Revision: 1.12 $
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(OutputStream out)

Methods inherited from class org.mortbay.http.BufferedOutputStream

bypassWrite, close, destroy, flush, getBypassBuffer, getCommitObserver, getOutputStream, isCommitted, resetStream, setBypassBuffer, setCommitObserver, wrapBuffer, write, write, writeHeader

Methods inherited from class org.mortbay.util.ByteBufferOutputStream

bufferSize, capacity, close, destroy, ensureCapacity, ensureReserve, ensureSize, ensureSize, ensureSpareCapacity, flush, isFixed, postReserve, postwrite, preReserve, prewrite, prewrite, prewrite, reset, resetStream, setFixed, size, spareCapacity, write, write, write, writeTo

Method Details

bypassWrite

protected void bypassWrite(byte[] b,
                           int offset,
                           int length)
            throws IOException
Overrides:
bypassWrite in interface BufferedOutputStream

close

public void close()
            throws IOException
Overrides:
close in interface BufferedOutputStream

destroy

public void destroy()
Overrides:
destroy in interface BufferedOutputStream

end

public void end()
            throws IOException

flush

public void flush()
            throws IOException
This implementation calls the commitObserver on the first flush since construction or reset.
Overrides:
flush in interface BufferedOutputStream

resetStream

public void resetStream()
Overrides:
resetStream in interface BufferedOutputStream

wrapBuffer

protected void wrapBuffer()
            throws IOException
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 interface BufferedOutputStream

write

public void write(AJP13Packet packet)
            throws IOException

writeHeader

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

writeTo

public void writeTo(OutputStream out)
            throws IOException
Overrides:
writeTo in interface ByteBufferOutputStream

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