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

## Class DiskAttribute

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

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

      public class DiskAttribute
      extends AbstractDiskHttpData
      implements Attribute

  Disk implementation of Attributes

- - ### Nested Class Summary

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

      `InterfaceHttpData.HttpDataType`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `baseDirectory`
    `static boolean` | `deleteOnExitTemporaryFile`
    `static String` | `postfix`
    `static String` | `prefix`

    - ### Fields inherited from class org.jboss.netty.handler.codec.http.multipart.AbstractDiskHttpData

      `file`

    - ### Fields inherited from class org.jboss.netty.handler.codec.http.multipart.AbstractHttpData

      `charset, completed, definedSize, name, size`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DiskAttribute(String name)` Constructor used for huge Attribute
    `DiskAttribute(String name, String value)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addContent(ChannelBuffer buffer, boolean last)` Add the content from the ChannelBuffer
    `int` | `compareTo(Attribute o)`
    `int` | `compareTo(InterfaceHttpData arg0)`
    `protected boolean` | `deleteOnExit()`
    `boolean` | `equals(Object o)`
    `protected String` | `getBaseDirectory()`
    `protected String` | `getDiskFilename()`
    `InterfaceHttpData.HttpDataType` | `getHttpDataType()`
    `protected String` | `getPostfix()`
    `protected String` | `getPrefix()`
    `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.http.multipart.AbstractDiskHttpData

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

    - ### Methods inherited from class org.jboss.netty.handler.codec.http.multipart.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.http.multipart.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.http.multipart.InterfaceHttpData

      `getName`

- - ### Field Detail

    - #### baseDirectory

          public static String baseDirectory

    - #### deleteOnExitTemporaryFile

          public static boolean deleteOnExitTemporaryFile

    - #### prefix

          public static String prefix

    - #### postfix

          public static String postfix

  - ### Constructor Detail

    - #### DiskAttribute

          public DiskAttribute(String name)

      Constructor used for huge Attribute
      Parameters:
        `name` -

    - #### DiskAttribute

          public DiskAttribute(String name,
                       String value)
                        throws 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()
                          throws IOException

      Description copied from interface: `Attribute`
      Returns the value of this HttpData.
      Specified by:
        `getValue` in interface `Attribute`
      Throws:
        `IOException`

    - #### 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(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 `AbstractDiskHttpData`
      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`

    - #### deleteOnExit

          protected boolean deleteOnExit()

      Specified by:
        `deleteOnExit` in class `AbstractDiskHttpData`
      Returns:
        True if the file should be deleted on Exit by default

    - #### getBaseDirectory

          protected String getBaseDirectory()

      Specified by:
        `getBaseDirectory` in class `AbstractDiskHttpData`
      Returns:
        the default base Directory

    - #### getDiskFilename

          protected String getDiskFilename()

      Specified by:
        `getDiskFilename` in class `AbstractDiskHttpData`
      Returns:
        the real DiskFilename (basename)

    - #### getPostfix

          protected String getPostfix()

      Specified by:
        `getPostfix` in class `AbstractDiskHttpData`
      Returns:
        the default postfix

    - #### getPrefix

          protected String getPrefix()

      Specified by:
        `getPrefix` in class `AbstractDiskHttpData`
      Returns:
        the default prefix

Copyright © 2008-2012 The Netty Project. All Rights Reserved.