public abstract class AbstractHttpData extends AbstractReferenceCounted implements HttpData
InterfaceHttpData.HttpDataType| 限定符和类型 | 字段和说明 |
|---|---|
protected long |
definedSize |
protected long |
size |
| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractHttpData(java.lang.String name,
java.nio.charset.Charset charset,
long size) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
checkSize(long newSize)
Check if the new size is not reaching the max limit allowed.
|
ByteBuf |
content()
Return the data which is held by this
ByteBufHolder. |
protected void |
deallocate()
Called once
AbstractReferenceCounted.refCnt() is equals 0. |
long |
definedLength()
Returns the defined length of the HttpData.
|
java.nio.charset.Charset |
getCharset()
Returns the Charset passed by the browser or null if not defined.
|
long |
getMaxSize()
Returns the maxSize for this HttpData.
|
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
|
protected void |
setCompleted() |
protected void |
setCompleted(boolean completed) |
void |
setMaxSize(long maxSize)
Set the maxSize for this HttpData.
|
abstract HttpData |
touch()
Records the current access location of this object for debugging purposes.
|
abstract HttpData |
touch(java.lang.Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
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, replace, retainedDuplicate, setContent, setContent, setContentgetHttpDataTyperefCnt, release, releaseprotected AbstractHttpData(java.lang.String name,
java.nio.charset.Charset charset,
long size)
public long getMaxSize()
HttpDatagetMaxSize 在接口中 HttpDatapublic void setMaxSize(long maxSize)
HttpDatasetMaxSize 在接口中 HttpDatapublic void checkSize(long newSize)
throws java.io.IOException
HttpDatapublic java.lang.String getName()
InterfaceHttpDatagetName 在接口中 InterfaceHttpDatapublic boolean isCompleted()
isCompleted 在接口中 HttpDataprotected void setCompleted()
protected void setCompleted(boolean completed)
public java.nio.charset.Charset getCharset()
HttpDatagetCharset 在接口中 HttpDatapublic void setCharset(java.nio.charset.Charset charset)
HttpDatasetCharset 在接口中 HttpDatacharset - Charset to set - must be not nullpublic long length()
HttpDatapublic long definedLength()
HttpDataFileUpload or any known big Attribute.definedLength 在接口中 HttpDatapublic ByteBuf content()
ByteBufHolderByteBufHolder.content 在接口中 ByteBufHolderprotected void deallocate()
AbstractReferenceCountedAbstractReferenceCounted.refCnt() is equals 0.deallocate 在类中 AbstractReferenceCountedpublic HttpData retain()
ReferenceCounted1.retain 在接口中 ByteBufHolderretain 在接口中 HttpDataretain 在接口中 InterfaceHttpDataretain 在接口中 ReferenceCountedretain 在类中 AbstractReferenceCountedpublic HttpData retain(int increment)
ReferenceCountedincrement.retain 在接口中 ByteBufHolderretain 在接口中 HttpDataretain 在接口中 InterfaceHttpDataretain 在接口中 ReferenceCountedretain 在类中 AbstractReferenceCountedpublic abstract HttpData touch()
ReferenceCountedResourceLeakDetector. This method is a shortcut to touch(null).touch 在接口中 ByteBufHoldertouch 在接口中 HttpDatatouch 在接口中 InterfaceHttpDatatouch 在接口中 ReferenceCountedtouch 在类中 AbstractReferenceCountedpublic abstract HttpData touch(java.lang.Object hint)
ReferenceCountedResourceLeakDetector.touch 在接口中 ByteBufHoldertouch 在接口中 HttpDatatouch 在接口中 InterfaceHttpDatatouch 在接口中 ReferenceCounted