org.jboss.netty.handler.codec.http2
Class MemoryAttribute

java.lang.Object
  extended by org.jboss.netty.handler.codec.http2.AbstractHttpData
      extended by org.jboss.netty.handler.codec.http2.AbstractMemoryHttpData
          extended by org.jboss.netty.handler.codec.http2.MemoryAttribute
All Implemented Interfaces:
Comparable<InterfaceHttpData>, Attribute, HttpData, InterfaceHttpData

public class MemoryAttribute
extends AbstractMemoryHttpData
implements Attribute

Memory implementation of Attributes

Author:
The Netty Project, Andy Taylor (andy.taylor@jboss.org), Trustin Lee, Frederic Bregier

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.handler.codec.http2.InterfaceHttpData
InterfaceHttpData.HttpDataType
 
Field Summary
 
Fields inherited from class org.jboss.netty.handler.codec.http2.AbstractMemoryHttpData
isRenamed
 
Fields inherited from class org.jboss.netty.handler.codec.http2.AbstractHttpData
charset, completed, definedSize, name, size
 
Constructor Summary
MemoryAttribute(String name)
           
MemoryAttribute(String name, String value)
           
 
Method Summary
 void addContent(org.jboss.netty.buffer.ChannelBuffer buffer, boolean last)
          Add the content from the ChannelBuffer
 int compareTo(Attribute o)
           
 int compareTo(InterfaceHttpData arg0)
           
 boolean equals(Object o)
           
 InterfaceHttpData.HttpDataType getHttpDataType()
           
 String getValue()
          Returns the value of this HttpData.
 int hashCode()
           
 void setValue(String value)
          Sets the value of this HttpData.
 String toString()
           
 
Methods inherited from class org.jboss.netty.handler.codec.http2.AbstractMemoryHttpData
delete, get, getChannelBuffer, getChunk, getFile, getString, getString, isInMemory, renameTo, setContent, setContent, setContent
 
Methods inherited from class org.jboss.netty.handler.codec.http2.AbstractHttpData
getCharset, getName, isCompleted, length, setCharset
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.netty.handler.codec.http2.HttpData
delete, get, getChannelBuffer, getCharset, getChunk, getFile, getString, getString, isCompleted, isInMemory, length, renameTo, setCharset, setContent, setContent, setContent
 
Methods inherited from interface org.jboss.netty.handler.codec.http2.InterfaceHttpData
getName
 

Constructor Detail

MemoryAttribute

public MemoryAttribute(String name)

MemoryAttribute

public MemoryAttribute(String name,
                       String value)
                throws NullPointerException,
                       IllegalArgumentException,
                       IOException
Parameters:
name -
value -
Throws:
NullPointerException
IllegalArgumentException
IOException
Method Detail

getHttpDataType

public InterfaceHttpData.HttpDataType getHttpDataType()
Specified by:
getHttpDataType in interface InterfaceHttpData
Returns:
The HttpDataType

getValue

public String getValue()
Description copied from interface: Attribute
Returns the value of this HttpData.

Specified by:
getValue in interface Attribute

setValue

public void setValue(String value)
              throws IOException
Description copied from interface: Attribute
Sets the value of this HttpData.

Specified by:
setValue in interface Attribute
Throws:
IOException

addContent

public void addContent(org.jboss.netty.buffer.ChannelBuffer buffer,
                       boolean last)
                throws IOException
Description copied from interface: HttpData
Add the content from the ChannelBuffer

Specified by:
addContent in interface HttpData
Overrides:
addContent in class AbstractMemoryHttpData
Parameters:
buffer - must be not null except if last is set to False
last - True of the buffer is the last one
Throws:
IOException

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

compareTo

public int compareTo(InterfaceHttpData arg0)
Specified by:
compareTo in interface Comparable<InterfaceHttpData>

compareTo

public int compareTo(Attribute o)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.