org.jboss.netty.handler.codec.http.multipart

## Class AbstractHttpData

- java.lang.Object
- - org.jboss.netty.handler.codec.http.multipart.AbstractHttpData

All Implemented Interfaces:
  Comparable<InterfaceHttpData>, HttpData, InterfaceHttpData

Direct Known Subclasses:
  AbstractDiskHttpData, AbstractMemoryHttpData

    public abstract class AbstractHttpData
    extends Object
    implements HttpData

Abstract HttpData implementation

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.jboss.netty.handler.codec.http.multipart.InterfaceHttpData

`InterfaceHttpData.HttpDataType`

### Field Summary

Fields
`protected Charset` `charset`
`protected boolean` `completed`
`protected long` `definedSize`
`protected String` `name`
`protected long` `size`

### Constructor Summary

Constructors
Constructor and Description
`AbstractHttpData(String name, Charset charset, long size)`

### Method Summary

Methods
`Charset` `getCharset()` Returns the Charset passed by the browser or null if not defined.
`String` `getName()` Returns the name of this InterfaceHttpData.
`boolean` `isCompleted()`
`long` `length()` Returns the size in byte of the InterfaceHttpData
`void` `setCharset(Charset charset)` Set the Charset passed by the browser if defined

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.jboss.netty.handler.codec.http.multipart.HttpData

`addContent, delete, get, getChannelBuffer, getChunk, getFile, getString, getString, isInMemory, renameTo, setContent, setContent, setContent`

### Methods inherited from interface org.jboss.netty.handler.codec.http.multipart.InterfaceHttpData

`getHttpDataType`

### Methods inherited from interface java.lang.Comparable

`compareTo`

### Field Detail

#### name

    protected final String name

#### definedSize

    protected long definedSize

#### size

    protected long size

#### charset

    protected Charset charset

#### completed

    protected boolean completed

### Constructor Detail

#### AbstractHttpData

    public AbstractHttpData(String name,
                    Charset charset,
                    long size)

### Method Detail

#### getName

    public String getName()

Description copied from interface: `InterfaceHttpData`
Returns the name of this InterfaceHttpData.

Specified by:
  `getName` in interface `InterfaceHttpData`

#### isCompleted

    public boolean isCompleted()

Specified by:
  `isCompleted` in interface `HttpData`
Returns:
  True if the InterfaceHttpData is completed (all data are stored)

#### getCharset

    public Charset getCharset()

Description copied from interface: `HttpData`
Returns the Charset passed by the browser or null if not defined.

Specified by:
  `getCharset` in interface `HttpData`
Returns:
  the Charset passed by the browser or null if not defined.

#### setCharset

    public void setCharset(Charset charset)

Description copied from interface: `HttpData`
Set the Charset passed by the browser if defined

Specified by:
  `setCharset` in interface `HttpData`
Parameters:
  `charset` - Charset to set - must be not null

#### length

    public long length()

Description copied from interface: `HttpData`
Returns the size in byte of the InterfaceHttpData

Specified by:
  `length` in interface `HttpData`
Returns:
  the size of the InterfaceHttpData