public abstract class AbstractHttpData extends io.netty.util.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.
|
io.netty.buffer.ByteBuf |
content() |
protected void |
deallocate() |
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() |
HttpData |
retain(int increment) |
void |
setCharset(Charset charset)
Set the Charset passed by the browser if defined
|
protected void |
setCompleted() |
void |
setMaxSize(long maxSize)
Set the maxSize for this HttpData.
|
abstract HttpData |
touch() |
abstract HttpData |
touch(Object hint) |
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, setContentgetHttpDataTypecompareTopublic 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()
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 io.netty.buffer.ByteBuf content()
content in interface io.netty.buffer.ByteBufHolderprotected void deallocate()
deallocate in class io.netty.util.AbstractReferenceCountedpublic HttpData retain()
retain in interface io.netty.buffer.ByteBufHolderretain in interface HttpDataretain in interface InterfaceHttpDataretain in interface io.netty.util.ReferenceCountedretain in class io.netty.util.AbstractReferenceCountedpublic HttpData retain(int increment)
retain in interface io.netty.buffer.ByteBufHolderretain in interface HttpDataretain in interface InterfaceHttpDataretain in interface io.netty.util.ReferenceCountedretain in class io.netty.util.AbstractReferenceCountedpublic abstract HttpData touch()
touch in interface io.netty.buffer.ByteBufHoldertouch in interface HttpDatatouch in interface InterfaceHttpDatatouch in interface io.netty.util.ReferenceCountedtouch in class io.netty.util.AbstractReferenceCountedCopyright © 2008–2017 The Netty Project. All rights reserved.