|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.http.HttpContent
public class HttpContent
Object represents HTTP message content: complete or part.
The HttpContent object could be used both with
fixed-size and chunked HTTP messages.
To get the HTTP message header - call getHttpHeader().
To build HttpContent message, use HttpContent.Builder object, which
could be get following way: builder(org.glassfish.grizzly.http.HttpHeader).
HttpPacket,
HttpHeader| Nested Class Summary | |
|---|---|
static class |
HttpContent.Builder<T extends HttpContent.Builder>
HttpContent message builder. |
| Field Summary | |
|---|---|
protected Buffer |
content
|
protected HttpHeader |
httpHeader
|
protected boolean |
isLast
|
| Constructor Summary | |
|---|---|
protected |
HttpContent()
|
protected |
HttpContent(HttpHeader httpHeader)
|
| Method Summary | |
|---|---|
HttpContent |
append(HttpContent element)
|
static HttpContent.Builder |
builder(HttpHeader httpHeader)
Returns HttpContent builder. |
static HttpContent |
create()
|
static HttpContent |
create(HttpHeader httpHeader)
|
Buffer |
getContent()
Get the HTTP message content Buffer. |
HttpHeader |
getHttpHeader()
Get the HTTP message header, associated with this content. |
boolean |
isHeader()
Returns true, if this HTTP message represents HTTP messsage header, or false otherwise. |
boolean |
isLast()
Return true, if the current content chunk is last, or false, if there are content chunks to follow. |
void |
recycle()
|
protected void |
reset()
Reset the internal state. |
protected void |
setContent(Buffer content)
|
void |
setLast(boolean isLast)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean isLast
protected Buffer content
protected HttpHeader httpHeader
| Constructor Detail |
|---|
protected HttpContent()
protected HttpContent(HttpHeader httpHeader)
| Method Detail |
|---|
public static HttpContent create()
public static HttpContent create(HttpHeader httpHeader)
public static HttpContent.Builder builder(HttpHeader httpHeader)
HttpContent builder.
httpHeader - related HTTP message header
HttpContent.Builder.public final Buffer getContent()
Buffer.
Buffer.protected final void setContent(Buffer content)
public final HttpHeader getHttpHeader()
HttpHeader.public boolean isLast()
public void setLast(boolean isLast)
public final boolean isHeader()
isHeader in interface HttpPacketpublic HttpContent append(HttpContent element)
append in interface Appendable<HttpContent>protected void reset()
public void recycle()
recycle in interface Cacheable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||