public abstract class AbstractHttpData extends AbstractReferenceCounted implements HttpData
InterfaceHttpData.HttpDataType| Modifier and Type | Field and Description |
|---|---|
protected java.nio.charset.Charset |
charset |
protected boolean |
completed |
protected long |
definedSize |
protected java.lang.String |
name |
protected long |
size |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHttpData(java.lang.String name,
java.nio.charset.Charset charset,
long size) |
| Modifier and Type | Method and Description |
|---|---|
ByteBuf |
content()
Return the data which is held by this
ByteBufHolder. |
protected void |
deallocate()
Called once
AbstractReferenceCounted.refCnt() is equals 0. |
java.nio.charset.Charset |
getCharset()
Returns the Charset passed by the browser or null if not defined.
|
java.lang.String |
getName()
Returns the name of this InterfaceHttpData.
|
boolean |
isCompleted() |
long |
length()
Returns the size in byte of the InterfaceHttpData
|
HttpData |
retain()
Increases the reference count by
1. |
HttpData |
retain(int increment)
Increases the reference count by the specified
increment. |
void |
setCharset(java.nio.charset.Charset charset)
Set the Charset passed by the browser if defined
|
refCnt, release, release, setRefCntclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddContent, copy, delete, duplicate, get, getByteBuf, getChunk, getFile, getString, getString, isInMemory, renameTo, setContent, setContent, setContentgetHttpDataTyperefCnt, release, releaseprotected final java.lang.String name
protected long definedSize
protected long size
protected java.nio.charset.Charset charset
protected boolean completed
protected AbstractHttpData(java.lang.String name,
java.nio.charset.Charset charset,
long size)
public java.lang.String getName()
InterfaceHttpDatagetName in interface InterfaceHttpDatapublic boolean isCompleted()
isCompleted in interface HttpDatapublic java.nio.charset.Charset getCharset()
HttpDatagetCharset in interface HttpDatapublic void setCharset(java.nio.charset.Charset charset)
HttpDatasetCharset in interface HttpDatacharset - Charset to set - must be not nullpublic long length()
HttpDatapublic ByteBuf content()
ByteBufHolderByteBufHolder.content in interface ByteBufHolderprotected void deallocate()
AbstractReferenceCountedAbstractReferenceCounted.refCnt() is equals 0.deallocate in class AbstractReferenceCountedpublic HttpData retain()
ReferenceCounted1.retain in interface ByteBufHolderretain in interface HttpDataretain in interface ReferenceCountedretain in class AbstractReferenceCountedpublic HttpData retain(int increment)
ReferenceCountedincrement.retain in interface ByteBufHolderretain in interface HttpDataretain in interface ReferenceCountedretain in class AbstractReferenceCountedCopyright © 2008–2018 The Netty Project. All rights reserved.