|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
org.apache.tomcat.core.OutputBuffer
The buffer used by tomcat response. It allows writting chars and bytes. It does the mixing in order to implement ServletOutputStream ( which has both byte and char methods ) and to allow a number of optimizations (like a jsp pre-computing the byte[], but using char for non-static content).
Field Summary | |
int |
BYTE_STATE
|
int |
CHAR_STATE
|
protected C2BConverter |
conv
|
static int |
DEFAULT_BUFFER_SIZE
|
static java.lang.String |
DEFAULT_ENCODING
|
protected java.util.Hashtable |
encoders
|
int |
INITIAL_STATE
|
Fields inherited from class java.io.Writer |
lock |
Constructor Summary | |
OutputBuffer()
|
|
OutputBuffer(int size)
|
Method Summary | |
void |
close()
|
void |
flush()
|
void |
flushBytes()
Real write - this buffer will be sent to the client |
void |
flushChars()
|
boolean |
flushCharsNeeded()
|
byte[] |
getBuffer()
|
int |
getBufferSize()
|
int |
getByteOff()
Deprecated. Used only in Ajp13Packet for a hack |
int |
getBytesWritten()
|
int |
getCharsWritten()
|
boolean |
isNew()
True if this buffer hasn't been used ( since recycle() ) - i.e. |
protected void |
log(java.lang.String s)
|
void |
realWriteBytes(byte[] buf,
int off,
int cnt)
Sends the buffer data to the client output, checking the state of Response and calling the right interceptors. |
void |
realWriteChars(char[] c,
int off,
int len)
Send the bytes ( usually the internal conversion buffer ). |
void |
recycle()
|
void |
reset()
|
void |
setBufferSize(int size)
|
void |
setByteOff(int c)
Deprecated. Used only in Ajp13Packet for a hack |
protected void |
setConverter()
|
void |
setEncoding(java.lang.String s)
|
void |
setResponse(Response resp)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(char[] c)
|
void |
write(char[] c,
int off,
int len)
|
void |
write(int c)
|
void |
write(java.lang.String s)
|
void |
write(java.lang.StringBuffer sb)
|
void |
write(java.lang.String s,
int off,
int len)
Append a string to the buffer |
void |
writeByte(int b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_ENCODING
public static final int DEFAULT_BUFFER_SIZE
public final int INITIAL_STATE
public final int CHAR_STATE
public final int BYTE_STATE
protected java.util.Hashtable encoders
protected C2BConverter conv
Constructor Detail |
public OutputBuffer()
public OutputBuffer(int size)
Method Detail |
public void setResponse(Response resp)
public byte[] getBuffer()
public int getByteOff()
public void setByteOff(int c)
protected void log(java.lang.String s)
public void realWriteBytes(byte[] buf, int off, int cnt) throws java.io.IOException
realWriteBytes
in interface ByteChunk.ByteOutputChannel
java.io.IOException
public void recycle()
public void write(byte[] b, int off, int len) throws java.io.IOException
java.io.IOException
public void writeByte(int b) throws java.io.IOException
java.io.IOException
public void write(int c) throws java.io.IOException
java.io.IOException
public void write(char[] c) throws java.io.IOException
java.io.IOException
public void write(char[] c, int off, int len) throws java.io.IOException
java.io.IOException
public void write(java.lang.StringBuffer sb) throws java.io.IOException
java.io.IOException
public void write(java.lang.String s, int off, int len) throws java.io.IOException
java.io.IOException
public void write(java.lang.String s) throws java.io.IOException
java.io.IOException
public void flushChars() throws java.io.IOException
java.io.IOException
public boolean flushCharsNeeded()
public void close() throws java.io.IOException
java.io.IOException
public void flush() throws java.io.IOException
java.io.IOException
public void setEncoding(java.lang.String s)
public void realWriteChars(char[] c, int off, int len) throws java.io.IOException
CharChunk.CharOutputChannel
realWriteChars
in interface CharChunk.CharOutputChannel
java.io.IOException
protected void setConverter()
public void flushBytes() throws java.io.IOException
java.io.IOException
public int getBytesWritten()
public int getCharsWritten()
public boolean isNew()
public void setBufferSize(int size)
public void reset()
public int getBufferSize()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |