Home / Class/ DiskAttribute Class — netty Architecture

DiskAttribute Class — netty Architecture

Architecture documentation for the DiskAttribute class in DiskAttribute.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  33bebd28_5d87_ab46_8f36_bb68623e9fc6["DiskAttribute"]
  683ce104_223d_7059_29db_751c2318c906["DiskAttribute.java"]
  33bebd28_5d87_ab46_8f36_bb68623e9fc6 -->|defined in| 683ce104_223d_7059_29db_751c2318c906
  51e788df_a70b_2f87_68c4_f9ddd1e698ed["DiskAttribute()"]
  33bebd28_5d87_ab46_8f36_bb68623e9fc6 -->|method| 51e788df_a70b_2f87_68c4_f9ddd1e698ed
  df3e02fe_e0bd_c6f1_8e02_9a2672ad926e["HttpDataType()"]
  33bebd28_5d87_ab46_8f36_bb68623e9fc6 -->|method| df3e02fe_e0bd_c6f1_8e02_9a2672ad926e
  cd1621ff_cab4_84f7_b0ae_6781db075af7["String()"]
  33bebd28_5d87_ab46_8f36_bb68623e9fc6 -->|method| cd1621ff_cab4_84f7_b0ae_6781db075af7
  bdaa7b11_b954_7027_4185_503a896ca761["setValue()"]
  33bebd28_5d87_ab46_8f36_bb68623e9fc6 -->|method| bdaa7b11_b954_7027_4185_503a896ca761
  69798e78_6542_27b4_3a82_7ce54db60c96["addContent()"]
  33bebd28_5d87_ab46_8f36_bb68623e9fc6 -->|method| 69798e78_6542_27b4_3a82_7ce54db60c96
  0eb5a02c_6dc7_b3cf_4e7b_8fa1a0f6740a["hashCode()"]
  33bebd28_5d87_ab46_8f36_bb68623e9fc6 -->|method| 0eb5a02c_6dc7_b3cf_4e7b_8fa1a0f6740a
  e42cd31d_32c9_2d0f_f6e5_89a28a210e8c["equals()"]
  33bebd28_5d87_ab46_8f36_bb68623e9fc6 -->|method| e42cd31d_32c9_2d0f_f6e5_89a28a210e8c
  50d915c0_611c_da84_0b84_80c665fcf5ae["compareTo()"]
  33bebd28_5d87_ab46_8f36_bb68623e9fc6 -->|method| 50d915c0_611c_da84_0b84_80c665fcf5ae
  886de6c0_0c4f_d562_f79b_54fcb8acd0d0["deleteOnExit()"]
  33bebd28_5d87_ab46_8f36_bb68623e9fc6 -->|method| 886de6c0_0c4f_d562_f79b_54fcb8acd0d0
  8da410c5_0686_8887_1960_b49de4a042ac["Attribute()"]
  33bebd28_5d87_ab46_8f36_bb68623e9fc6 -->|method| 8da410c5_0686_8887_1960_b49de4a042ac

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/multipart/DiskAttribute.java lines 31–272

public class DiskAttribute extends AbstractDiskHttpData implements Attribute {
    public static String baseDirectory;

    public static boolean deleteOnExitTemporaryFile = true;

    public static final String prefix = "Attr_";

    public static final String postfix = ".att";

    private String baseDir;

    private boolean deleteOnExit;

    /**
     * Constructor used for huge Attribute
     */
    public DiskAttribute(String name) {
        this(name, HttpConstants.DEFAULT_CHARSET);
    }

    public DiskAttribute(String name, String baseDir, boolean deleteOnExit) {
        this(name, HttpConstants.DEFAULT_CHARSET);
        this.baseDir = baseDir == null ? baseDirectory : baseDir;
        this.deleteOnExit = deleteOnExit;
    }

    public DiskAttribute(String name, long definedSize) {
        this(name, definedSize, HttpConstants.DEFAULT_CHARSET, baseDirectory, deleteOnExitTemporaryFile);
    }

    public DiskAttribute(String name, long definedSize, String baseDir, boolean deleteOnExit) {
        this(name, definedSize, HttpConstants.DEFAULT_CHARSET);
        this.baseDir = baseDir == null ? baseDirectory : baseDir;
        this.deleteOnExit = deleteOnExit;
    }

    public DiskAttribute(String name, Charset charset) {
        this(name, charset, baseDirectory, deleteOnExitTemporaryFile);
    }

    public DiskAttribute(String name, Charset charset, String baseDir, boolean deleteOnExit) {
        super(name, charset, 0);
        this.baseDir = baseDir == null ? baseDirectory : baseDir;
        this.deleteOnExit = deleteOnExit;
    }

    public DiskAttribute(String name, long definedSize, Charset charset) {
        this(name, definedSize, charset, baseDirectory, deleteOnExitTemporaryFile);
    }

    public DiskAttribute(String name, long definedSize, Charset charset, String baseDir, boolean deleteOnExit) {
        super(name, charset, definedSize);
        this.baseDir = baseDir == null ? baseDirectory : baseDir;
        this.deleteOnExit = deleteOnExit;
    }

    public DiskAttribute(String name, String value) throws IOException {
        this(name, value, HttpConstants.DEFAULT_CHARSET);
    }

    public DiskAttribute(String name, String value, Charset charset) throws IOException {
        this(name, value, charset, baseDirectory, deleteOnExitTemporaryFile);
    }

    public DiskAttribute(String name, String value, Charset charset,
                         String baseDir, boolean deleteOnExit) throws IOException {
        super(name, charset, 0); // Attribute have no default size
        setValue(value);
        this.baseDir = baseDir == null ? baseDirectory : baseDir;
        this.deleteOnExit = deleteOnExit;
    }

    @Override
    public HttpDataType getHttpDataType() {
        return HttpDataType.Attribute;
    }

    @Override
    public String getValue() throws IOException {
        byte [] bytes = get();
        return new String(bytes, getCharset());

Frequently Asked Questions

What is the DiskAttribute class?
DiskAttribute is a class in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/multipart/DiskAttribute.java.
Where is DiskAttribute defined?
DiskAttribute is defined in codec-http/src/main/java/io/netty/handler/codec/http/multipart/DiskAttribute.java at line 31.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free