public interface Generator
Modifier and Type | Field and Description |
---|---|
static boolean |
LAST |
static boolean |
MORE |
Modifier and Type | Method and Description |
---|---|
void |
addContent(Buffer content,
boolean last)
Add content.
|
void |
complete() |
void |
completeHeader(HttpFields responseFields,
boolean last) |
int |
flushBuffer() |
int |
getContentBufferSize() |
long |
getContentWritten() |
void |
increaseContentBufferSize(int size) |
boolean |
isAllContentWritten() |
boolean |
isBufferFull() |
boolean |
isCommitted() |
boolean |
isComplete() |
boolean |
isIdle() |
boolean |
isPersistent() |
boolean |
isWritten() |
void |
reset() |
void |
resetBuffer() |
void |
returnBuffers() |
void |
sendError(int code,
String reason,
String content,
boolean close) |
void |
setContentLength(long length) |
void |
setDate(Buffer timeStampBuffer) |
void |
setHead(boolean head) |
void |
setPersistent(boolean persistent) |
void |
setRequest(String method,
String uri) |
void |
setResponse(int status,
String reason) |
void |
setSendServerVersion(boolean sendServerVersion) |
void |
setVersion(int version) |
static final boolean LAST
static final boolean MORE
void addContent(Buffer content, boolean last) throws IOException
content
- last
- IllegalArgumentException
- if content
is immutable
.IllegalStateException
- If the request is not expecting any more content,
or if the buffers are full and cannot be flushed.IOException
- if there is a problem flushing the buffers.void complete() throws IOException
IOException
void completeHeader(HttpFields responseFields, boolean last) throws IOException
IOException
int flushBuffer() throws IOException
IOException
int getContentBufferSize()
long getContentWritten()
boolean isWritten()
boolean isAllContentWritten()
void increaseContentBufferSize(int size)
boolean isBufferFull()
boolean isCommitted()
boolean isComplete()
boolean isPersistent()
void reset()
void resetBuffer()
void returnBuffers()
void sendError(int code, String reason, String content, boolean close) throws IOException
IOException
void setHead(boolean head)
void setResponse(int status, String reason)
void setSendServerVersion(boolean sendServerVersion)
void setVersion(int version)
boolean isIdle()
void setContentLength(long length)
void setPersistent(boolean persistent)
void setDate(Buffer timeStampBuffer)
Copyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.