public class MemoryAttribute extends AbstractMemoryHttpData implements Attribute
InterfaceHttpData.HttpDataType
definedSize, size
Constructor and Description |
---|
MemoryAttribute(String name) |
MemoryAttribute(String name,
Charset charset) |
MemoryAttribute(String name,
long definedSize) |
MemoryAttribute(String name,
long definedSize,
Charset charset) |
MemoryAttribute(String name,
String value) |
MemoryAttribute(String name,
String value,
Charset charset) |
Modifier and Type | Method and Description |
---|---|
void |
addContent(ByteBuf buffer,
boolean last)
Add the content from the ChannelBuffer
|
int |
compareTo(Attribute o) |
int |
compareTo(InterfaceHttpData other) |
Attribute |
copy()
Creates a deep copy of this
ByteBufHolder . |
Attribute |
duplicate()
Duplicates this
ByteBufHolder . |
boolean |
equals(Object o) |
InterfaceHttpData.HttpDataType |
getHttpDataType() |
String |
getValue()
Returns the value of this HttpData.
|
int |
hashCode() |
Attribute |
replace(ByteBuf content)
Returns a new
ByteBufHolder which contains the specified content . |
Attribute |
retain()
Increases the reference count by
1 . |
Attribute |
retain(int increment)
Increases the reference count by the specified
increment . |
Attribute |
retainedDuplicate()
Duplicates this
ByteBufHolder . |
void |
setValue(String value)
Sets the value of this HttpData.
|
String |
toString() |
Attribute |
touch()
Records the current access location of this object for debugging purposes.
|
Attribute |
touch(Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
delete, get, getByteBuf, getChunk, getFile, getString, getString, isInMemory, renameTo, setContent, setContent, setContent
checkSize, content, deallocate, definedLength, getCharset, getMaxSize, getName, isCompleted, length, setCharset, setCompleted, setMaxSize
refCnt, release, release, setRefCnt
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
checkSize, definedLength, delete, get, getByteBuf, getCharset, getChunk, getFile, getMaxSize, getString, getString, isCompleted, isInMemory, length, renameTo, setCharset, setContent, setContent, setContent, setMaxSize
getName
content
refCnt, release, release
public MemoryAttribute(String name)
public MemoryAttribute(String name, long definedSize)
public MemoryAttribute(String name, String value) throws IOException
IOException
public MemoryAttribute(String name, String value, Charset charset) throws IOException
IOException
public InterfaceHttpData.HttpDataType getHttpDataType()
getHttpDataType
in interface InterfaceHttpData
public String getValue()
Attribute
public void setValue(String value) throws IOException
Attribute
setValue
in interface Attribute
IOException
public void addContent(ByteBuf buffer, boolean last) throws IOException
HttpData
addContent
in interface HttpData
addContent
in class AbstractMemoryHttpData
buffer
- must be not null except if last is set to Falselast
- True of the buffer is the last oneIOException
public int compareTo(InterfaceHttpData other)
compareTo
in interface Comparable<InterfaceHttpData>
public int compareTo(Attribute o)
public Attribute copy()
ByteBufHolder
ByteBufHolder
.public Attribute duplicate()
ByteBufHolder
ByteBufHolder
. Be aware that this will not automatically call ByteBufHolder.retain()
.public Attribute retainedDuplicate()
ByteBufHolder
ByteBufHolder
. This method returns a retained duplicate unlike ByteBufHolder.duplicate()
.retainedDuplicate
in interface ByteBufHolder
retainedDuplicate
in interface Attribute
retainedDuplicate
in interface HttpData
ByteBuf.retainedDuplicate()
public Attribute replace(ByteBuf content)
ByteBufHolder
ByteBufHolder
which contains the specified content
.public Attribute retain()
ReferenceCounted
1
.retain
in interface ByteBufHolder
retain
in interface Attribute
retain
in interface HttpData
retain
in interface InterfaceHttpData
retain
in interface ReferenceCounted
retain
in class AbstractHttpData
public Attribute retain(int increment)
ReferenceCounted
increment
.retain
in interface ByteBufHolder
retain
in interface Attribute
retain
in interface HttpData
retain
in interface InterfaceHttpData
retain
in interface ReferenceCounted
retain
in class AbstractHttpData
public Attribute touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
in interface ByteBufHolder
touch
in interface Attribute
touch
in interface HttpData
touch
in interface InterfaceHttpData
touch
in interface ReferenceCounted
touch
in class AbstractMemoryHttpData
public Attribute touch(Object hint)
ReferenceCounted
ResourceLeakDetector
.touch
in interface ByteBufHolder
touch
in interface Attribute
touch
in interface HttpData
touch
in interface InterfaceHttpData
touch
in interface ReferenceCounted
touch
in class AbstractMemoryHttpData
Copyright © 2008–2017 The Netty Project. All rights reserved.