public abstract class AbstractHttpData extends AbstractReferenceCounted implements HttpData
InterfaceHttpData.HttpDataType| Modifier and Type | Field and Description |
|---|---|
protected long |
definedSize |
protected long |
size |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHttpData(String name,
Charset charset,
long size) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
Charset |
getCharset()
Returns the Charset passed by the browser or null if not defined.
|
long |
getMaxSize()
Returns the maxSize for this HttpData.
|
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(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(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, setContentgetHttpDataTypecompareTorefCnt, release, releasepublic long getMaxSize()
HttpDatagetMaxSize in interface HttpDatapublic void setMaxSize(long maxSize)
HttpDatasetMaxSize in interface HttpDatapublic void checkSize(long newSize)
throws IOException
HttpDatacheckSize in interface HttpDataIOExceptionpublic String getName()
InterfaceHttpDatagetName in interface InterfaceHttpDatapublic boolean isCompleted()
isCompleted in interface HttpDataprotected void setCompleted()
protected void setCompleted(boolean completed)
public Charset getCharset()
HttpDatagetCharset in interface HttpDatapublic void setCharset(Charset charset)
HttpDatasetCharset in interface HttpDatacharset - Charset to set - must be not nullpublic long length()
HttpDatapublic long definedLength()
HttpDataFileUpload or any known big Attribute.definedLength in interface 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 InterfaceHttpDataretain in interface ReferenceCountedretain in class AbstractReferenceCountedpublic HttpData retain(int increment)
ReferenceCountedincrement.retain in interface ByteBufHolderretain in interface HttpDataretain in interface InterfaceHttpDataretain in interface ReferenceCountedretain in class AbstractReferenceCountedpublic abstract HttpData touch()
ReferenceCountedResourceLeakDetector. This method is a shortcut to touch(null).touch in interface ByteBufHoldertouch in interface HttpDatatouch in interface InterfaceHttpDatatouch in interface ReferenceCountedtouch in class AbstractReferenceCountedpublic abstract HttpData touch(Object hint)
ReferenceCountedResourceLeakDetector.touch in interface ByteBufHoldertouch in interface HttpDatatouch in interface InterfaceHttpDatatouch in interface ReferenceCountedCopyright © 2008–2025 The Netty Project. All rights reserved.