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 Attributecopy()Creates a deep copy of thisByteBufHolder.Attributeduplicate()Duplicates thisByteBufHolder.java.lang.StringgetValue()Returns the value of this HttpData.(package private) AttributemakeDiskData()private static AttributemakeInitialAttributeFromValue(java.lang.String name, java.lang.String value, long limitSize, java.nio.charset.Charset charset, java.lang.String baseDir, boolean deleteOnExit)Attributereplace(ByteBuf content)Returns a newByteBufHolderwhich contains the specifiedcontent.Attributeretain()Increases the reference count by1.Attributeretain(int increment)Increases the reference count by the specifiedincrement.AttributeretainedDuplicate()Duplicates thisByteBufHolder.voidsetValue(java.lang.String value)Sets the value of this HttpData.Attributetouch()Records the current access location of this object for debugging purposes.Attributetouch(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.IOExceptionDescription copied from interface:AttributeReturns the value of this HttpData.
-
setValue
public void setValue(java.lang.String value) throws java.io.IOExceptionDescription copied from interface:AttributeSets the value of this HttpData.
-
makeDiskData
Attribute makeDiskData()
- Specified by:
makeDiskDatain classAbstractMixedHttpData<Attribute>
-
copy
public Attribute copy()
Description copied from interface:ByteBufHolderCreates a deep copy of thisByteBufHolder.- Specified by:
copyin interfaceAttribute- Specified by:
copyin interfaceByteBufHolder- Specified by:
copyin interfaceHttpData- Overrides:
copyin classAbstractMixedHttpData<Attribute>
-
duplicate
public Attribute duplicate()
Description copied from interface:ByteBufHolderDuplicates thisByteBufHolder. Be aware that this will not automatically callByteBufHolder.retain().- Specified by:
duplicatein interfaceAttribute- Specified by:
duplicatein interfaceByteBufHolder- Specified by:
duplicatein interfaceHttpData- Overrides:
duplicatein classAbstractMixedHttpData<Attribute>
-
replace
public Attribute replace(ByteBuf content)
Description copied from interface:ByteBufHolderReturns a newByteBufHolderwhich contains the specifiedcontent.- Specified by:
replacein interfaceAttribute- Specified by:
replacein interfaceByteBufHolder- Specified by:
replacein interfaceHttpData- Overrides:
replacein classAbstractMixedHttpData<Attribute>
-
retain
public Attribute retain()
Description copied from interface:ReferenceCountedIncreases the reference count by1.- Specified by:
retainin interfaceAttribute- Specified by:
retainin interfaceByteBufHolder- Specified by:
retainin interfaceHttpData- Specified by:
retainin interfaceInterfaceHttpData- Specified by:
retainin interfaceReferenceCounted- Overrides:
retainin classAbstractMixedHttpData<Attribute>
-
retain
public Attribute retain(int increment)
Description copied from interface:ReferenceCountedIncreases the reference count by the specifiedincrement.- Specified by:
retainin interfaceAttribute- Specified by:
retainin interfaceByteBufHolder- Specified by:
retainin interfaceHttpData- Specified by:
retainin interfaceInterfaceHttpData- Specified by:
retainin interfaceReferenceCounted- Overrides:
retainin classAbstractMixedHttpData<Attribute>
-
retainedDuplicate
public Attribute retainedDuplicate()
Description copied from interface:ByteBufHolderDuplicates thisByteBufHolder. This method returns a retained duplicate unlikeByteBufHolder.duplicate().- Specified by:
retainedDuplicatein interfaceAttribute- Specified by:
retainedDuplicatein interfaceByteBufHolder- Specified by:
retainedDuplicatein interfaceHttpData- Overrides:
retainedDuplicatein classAbstractMixedHttpData<Attribute>- See Also:
ByteBuf.retainedDuplicate()
-
touch
public Attribute touch()
Description copied from interface:ReferenceCountedRecords 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:
touchin interfaceAttribute- Specified by:
touchin interfaceByteBufHolder- Specified by:
touchin interfaceHttpData- Specified by:
touchin interfaceInterfaceHttpData- Specified by:
touchin interfaceReferenceCounted- Overrides:
touchin classAbstractMixedHttpData<Attribute>
-
touch
public Attribute touch(java.lang.Object hint)
Description copied from interface:ReferenceCountedRecords 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:
touchin interfaceAttribute- Specified by:
touchin interfaceByteBufHolder- Specified by:
touchin interfaceHttpData- Specified by:
touchin interfaceInterfaceHttpData- Specified by:
touchin interfaceReferenceCounted- Overrides:
touchin classAbstractMixedHttpData<Attribute>
-
-