|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.http.server.io.OutputBuffer
public class OutputBuffer
Abstraction exposing both byte and character methods to write content to the HTTP messaging system in Grizzly.
| Constructor Summary | |
|---|---|
OutputBuffer()
|
|
| Method Summary | |
|---|---|
void |
acknowledge()
Acknowledge a HTTP Expect header. |
boolean |
canWrite(int length)
|
boolean |
canWriteChar(int length)
|
void |
close()
|
void |
commit()
Commit the response. |
void |
endRequest()
|
void |
flush()
Flush the response. |
int |
getBufferSize()
|
void |
initialize(HttpResponsePacket response,
FilterChainContext ctx)
|
boolean |
notifyCanWrite(WriteHandler handler,
int length)
|
void |
processingChars()
|
void |
recycle()
Recycle the output buffer. |
void |
reset()
Reset current response. |
void |
setBufferSize(int bufferSize)
|
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(char[] cbuf)
|
void |
write(char[] cbuf,
int off,
int len)
|
void |
write(String str)
|
void |
write(String str,
int off,
int len)
|
void |
writeBuffer(Buffer buffer)
Writes the contents of the specified Buffer to the client. |
void |
writeByte(int b)
|
void |
writeByteBuffer(ByteBuffer byteBuffer)
Writes the contents of the specified ByteBuffer to the client. |
void |
writeChar(int c)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OutputBuffer()
| Method Detail |
|---|
public void initialize(HttpResponsePacket response,
FilterChainContext ctx)
public void processingChars()
public int getBufferSize()
public void setBufferSize(int bufferSize)
public void reset()
IllegalStateException - if the response has already been committedpublic void recycle()
public void endRequest()
throws IOException
IOExceptionpublic void commit()
public void acknowledge()
throws IOException
Expect header. The response status
code and reason phrase should be set before invoking this method.
IOException - if an error occurs writing the acknowledgment.
public void write(char[] cbuf,
int off,
int len)
throws IOException
IOException
public void writeChar(int c)
throws IOException
IOException
public void write(char[] cbuf)
throws IOException
IOException
public void write(String str)
throws IOException
IOException
public void write(String str,
int off,
int len)
throws IOException
IOException
public void writeByte(int b)
throws IOException
IOException
public void write(byte[] b)
throws IOException
IOException
public void write(byte[] b,
int off,
int len)
throws IOException
IOException
public void close()
throws IOException
IOException
public void flush()
throws IOException
IOException - an underlying I/O error occurred
public void writeByteBuffer(ByteBuffer byteBuffer)
throws IOException
Writes the contents of the specified ByteBuffer to the client.
ByteBuffer will be directly used by underlying
connection, so it could be reused only if it has been flushed.
byteBuffer - the ByteBuffer to write
IOException - if an error occurs during the write
public void writeBuffer(Buffer buffer)
throws IOException
Writes the contents of the specified Buffer to the client.
Buffer will be directly used by underlying
connection, so it could be reused only if it has been flushed.
buffer - the ByteBuffer to write
IOException - if an error occurs during the writepublic boolean canWriteChar(int length)
public boolean canWrite(int length)
AsyncQueueWriter.canWrite(org.glassfish.grizzly.Connection, int)
public boolean notifyCanWrite(WriteHandler handler,
int length)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||