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() |
protected void |
setCompleted(boolean completed) |
void |
setMaxSize(long maxSize)
Set the maxSize for this HttpData.
|
abstract HttpData |
touch() |
abstract HttpData |
touch(Object hint) |
refCnt, release, release, setRefCnt
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addContent, copy, delete, duplicate, get, getByteBuf, getChunk, getFile, getString, getString, isInMemory, renameTo, replace, retainedDuplicate, setContent, setContent, setContent
getHttpDataType
compareTo
public long getMaxSize()
HttpData
getMaxSize
in interface HttpData
public void setMaxSize(long maxSize)
HttpData
setMaxSize
in interface HttpData
public void checkSize(long newSize) throws IOException
HttpData
checkSize
in interface HttpData
IOException
public String getName()
InterfaceHttpData
getName
in interface InterfaceHttpData
public boolean isCompleted()
isCompleted
in interface HttpData
protected void setCompleted()
protected void setCompleted(boolean completed)
public Charset getCharset()
HttpData
getCharset
in interface HttpData
public void setCharset(Charset charset)
HttpData
setCharset
in interface HttpData
charset
- Charset to set - must be not nullpublic long length()
HttpData
public long definedLength()
HttpData
FileUpload
or any known big Attribute
.definedLength
in interface HttpData
public io.netty.buffer.ByteBuf content()
content
in interface io.netty.buffer.ByteBufHolder
protected void deallocate()
deallocate
in class io.netty.util.AbstractReferenceCounted
public HttpData retain()
retain
in interface io.netty.buffer.ByteBufHolder
retain
in interface HttpData
retain
in interface InterfaceHttpData
retain
in interface io.netty.util.ReferenceCounted
retain
in class io.netty.util.AbstractReferenceCounted
public HttpData retain(int increment)
retain
in interface io.netty.buffer.ByteBufHolder
retain
in interface HttpData
retain
in interface InterfaceHttpData
retain
in interface io.netty.util.ReferenceCounted
retain
in class io.netty.util.AbstractReferenceCounted
public abstract HttpData touch()
touch
in interface io.netty.buffer.ByteBufHolder
touch
in interface HttpData
touch
in interface InterfaceHttpData
touch
in interface io.netty.util.ReferenceCounted
touch
in class io.netty.util.AbstractReferenceCounted
Copyright © 2008–2023 The Netty Project. All rights reserved.