Class MixedAttribute
- java.lang.Object
-
- io.netty.util.AbstractReferenceCounted
-
- io.netty.handler.codec.http.multipart.AbstractMixedHttpData<Attribute>
-
- io.netty.handler.codec.http.multipart.MixedAttribute
-
- All Implemented Interfaces:
ByteBufHolder
,Attribute
,HttpData
,InterfaceHttpData
,ReferenceCounted
,java.lang.Comparable<InterfaceHttpData>
public class MixedAttribute extends AbstractMixedHttpData<Attribute> implements Attribute
Mixed implementation using both in Memory and in File with a limit of size
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.handler.codec.http.multipart.InterfaceHttpData
InterfaceHttpData.HttpDataType
-
-
Field Summary
-
Fields inherited from class io.netty.handler.codec.http.multipart.AbstractMixedHttpData
baseDir, deleteOnExit, wrapped
-
-
Constructor Summary
Constructors Constructor Description MixedAttribute(java.lang.String name, long limitSize)
MixedAttribute(java.lang.String name, long definedSize, long limitSize)
MixedAttribute(java.lang.String name, long definedSize, long limitSize, java.nio.charset.Charset charset)
MixedAttribute(java.lang.String name, long definedSize, long limitSize, java.nio.charset.Charset charset, java.lang.String baseDir, boolean deleteOnExit)
MixedAttribute(java.lang.String name, long limitSize, java.nio.charset.Charset charset)
MixedAttribute(java.lang.String name, long limitSize, java.nio.charset.Charset charset, java.lang.String baseDir, boolean deleteOnExit)
MixedAttribute(java.lang.String name, java.lang.String value, long limitSize)
MixedAttribute(java.lang.String name, java.lang.String value, long limitSize, java.nio.charset.Charset charset)
MixedAttribute(java.lang.String name, java.lang.String value, long limitSize, java.nio.charset.Charset charset, java.lang.String baseDir, boolean deleteOnExit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Attribute
copy()
Creates a deep copy of thisByteBufHolder
.Attribute
duplicate()
Duplicates thisByteBufHolder
.java.lang.String
getValue()
Returns the value of this HttpData.(package private) Attribute
makeDiskData()
private static Attribute
makeInitialAttributeFromValue(java.lang.String name, java.lang.String value, long limitSize, java.nio.charset.Charset charset, java.lang.String baseDir, boolean deleteOnExit)
Attribute
replace(ByteBuf content)
Returns a newByteBufHolder
which contains the specifiedcontent
.Attribute
retain()
Increases the reference count by1
.Attribute
retain(int increment)
Increases the reference count by the specifiedincrement
.Attribute
retainedDuplicate()
Duplicates thisByteBufHolder
.void
setValue(java.lang.String value)
Sets the value of this HttpData.Attribute
touch()
Records the current access location of this object for debugging purposes.Attribute
touch(java.lang.Object hint)
Records the current access location of this object with an additional arbitrary information for debugging purposes.-
Methods inherited from class io.netty.handler.codec.http.multipart.AbstractMixedHttpData
addContent, checkSize, compareTo, content, deallocate, definedLength, delete, equals, get, getByteBuf, getCharset, getChunk, getFile, getHttpDataType, getMaxSize, getName, getString, getString, hashCode, isCompleted, isInMemory, length, renameTo, setCharset, setContent, setContent, setContent, setMaxSize, toString
-
Methods inherited from class io.netty.util.AbstractReferenceCounted
refCnt, release, release, setRefCnt
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty.buffer.ByteBufHolder
content
-
Methods inherited from interface io.netty.handler.codec.http.multipart.HttpData
addContent, checkSize, definedLength, delete, get, getByteBuf, getCharset, getChunk, getFile, getMaxSize, getString, getString, isCompleted, isInMemory, length, renameTo, setCharset, setContent, setContent, setContent, setMaxSize
-
Methods inherited from interface io.netty.handler.codec.http.multipart.InterfaceHttpData
getHttpDataType, getName
-
Methods inherited from interface io.netty.util.ReferenceCounted
refCnt, release, release
-
-
-
-
Constructor Detail
-
MixedAttribute
public MixedAttribute(java.lang.String name, long limitSize)
-
MixedAttribute
public MixedAttribute(java.lang.String name, long definedSize, long limitSize)
-
MixedAttribute
public MixedAttribute(java.lang.String name, long limitSize, java.nio.charset.Charset charset)
-
MixedAttribute
public MixedAttribute(java.lang.String name, long limitSize, java.nio.charset.Charset charset, java.lang.String baseDir, boolean deleteOnExit)
-
MixedAttribute
public MixedAttribute(java.lang.String name, long definedSize, long limitSize, java.nio.charset.Charset charset)
-
MixedAttribute
public MixedAttribute(java.lang.String name, long definedSize, long limitSize, java.nio.charset.Charset charset, java.lang.String baseDir, boolean deleteOnExit)
-
MixedAttribute
public MixedAttribute(java.lang.String name, java.lang.String value, long limitSize)
-
MixedAttribute
public MixedAttribute(java.lang.String name, java.lang.String value, long limitSize, java.nio.charset.Charset charset)
-
MixedAttribute
public MixedAttribute(java.lang.String name, java.lang.String value, long limitSize, java.nio.charset.Charset charset, java.lang.String baseDir, boolean deleteOnExit)
-
-
Method Detail
-
makeInitialAttributeFromValue
private static Attribute makeInitialAttributeFromValue(java.lang.String name, java.lang.String value, long limitSize, java.nio.charset.Charset charset, java.lang.String baseDir, boolean deleteOnExit)
-
getValue
public java.lang.String getValue() throws java.io.IOException
Description copied from interface:Attribute
Returns the value of this HttpData.
-
setValue
public void setValue(java.lang.String value) throws java.io.IOException
Description copied from interface:Attribute
Sets the value of this HttpData.
-
makeDiskData
Attribute makeDiskData()
- Specified by:
makeDiskData
in classAbstractMixedHttpData<Attribute>
-
copy
public Attribute copy()
Description copied from interface:ByteBufHolder
Creates a deep copy of thisByteBufHolder
.- Specified by:
copy
in interfaceAttribute
- Specified by:
copy
in interfaceByteBufHolder
- Specified by:
copy
in interfaceHttpData
- Overrides:
copy
in classAbstractMixedHttpData<Attribute>
-
duplicate
public Attribute duplicate()
Description copied from interface:ByteBufHolder
Duplicates thisByteBufHolder
. Be aware that this will not automatically callByteBufHolder.retain()
.- Specified by:
duplicate
in interfaceAttribute
- Specified by:
duplicate
in interfaceByteBufHolder
- Specified by:
duplicate
in interfaceHttpData
- Overrides:
duplicate
in classAbstractMixedHttpData<Attribute>
-
replace
public Attribute replace(ByteBuf content)
Description copied from interface:ByteBufHolder
Returns a newByteBufHolder
which contains the specifiedcontent
.- Specified by:
replace
in interfaceAttribute
- Specified by:
replace
in interfaceByteBufHolder
- Specified by:
replace
in interfaceHttpData
- Overrides:
replace
in classAbstractMixedHttpData<Attribute>
-
retain
public Attribute retain()
Description copied from interface:ReferenceCounted
Increases the reference count by1
.- Specified by:
retain
in interfaceAttribute
- Specified by:
retain
in interfaceByteBufHolder
- Specified by:
retain
in interfaceHttpData
- Specified by:
retain
in interfaceInterfaceHttpData
- Specified by:
retain
in interfaceReferenceCounted
- Overrides:
retain
in classAbstractMixedHttpData<Attribute>
-
retain
public Attribute retain(int increment)
Description copied from interface:ReferenceCounted
Increases the reference count by the specifiedincrement
.- Specified by:
retain
in interfaceAttribute
- Specified by:
retain
in interfaceByteBufHolder
- Specified by:
retain
in interfaceHttpData
- Specified by:
retain
in interfaceInterfaceHttpData
- Specified by:
retain
in interfaceReferenceCounted
- Overrides:
retain
in classAbstractMixedHttpData<Attribute>
-
retainedDuplicate
public Attribute retainedDuplicate()
Description copied from interface:ByteBufHolder
Duplicates thisByteBufHolder
. This method returns a retained duplicate unlikeByteBufHolder.duplicate()
.- Specified by:
retainedDuplicate
in interfaceAttribute
- Specified by:
retainedDuplicate
in interfaceByteBufHolder
- Specified by:
retainedDuplicate
in interfaceHttpData
- Overrides:
retainedDuplicate
in classAbstractMixedHttpData<Attribute>
- See Also:
ByteBuf.retainedDuplicate()
-
touch
public Attribute touch()
Description copied from interface:ReferenceCounted
Records the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector
. This method is a shortcut totouch(null)
.- Specified by:
touch
in interfaceAttribute
- Specified by:
touch
in interfaceByteBufHolder
- Specified by:
touch
in interfaceHttpData
- Specified by:
touch
in interfaceInterfaceHttpData
- Specified by:
touch
in interfaceReferenceCounted
- Overrides:
touch
in classAbstractMixedHttpData<Attribute>
-
touch
public Attribute touch(java.lang.Object hint)
Description copied from interface:ReferenceCounted
Records the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector
.- Specified by:
touch
in interfaceAttribute
- Specified by:
touch
in interfaceByteBufHolder
- Specified by:
touch
in interfaceHttpData
- Specified by:
touch
in interfaceInterfaceHttpData
- Specified by:
touch
in interfaceReferenceCounted
- Overrides:
touch
in classAbstractMixedHttpData<Attribute>
-
-