1 31 32 package org.apache.commons.httpclient.methods.multipart; 33 34 35 40 public abstract class PartBase extends Part { 41 42 43 private String name; 44 45 46 private String contentType; 47 48 49 private String charSet; 50 51 52 private String transferEncoding; 53 54 62 public PartBase(String name, String contentType, String charSet, String transferEncoding) { 63 64 if (name == null) { 65 throw new IllegalArgumentException ("Name must not be null"); 66 } 67 this.name = name; 68 this.contentType = contentType; 69 this.charSet = charSet; 70 this.transferEncoding = transferEncoding; 71 } 72 73 78 public String getName() { 79 return this.name; 80 } 81 82 86 public String getContentType() { 87 return this.contentType; 88 } 89 90 94 public String getCharSet() { 95 return this.charSet; 96 } 97 98 102 public String getTransferEncoding() { 103 return transferEncoding; 104 } 105 106 112 public void setCharSet(String charSet) { 113 this.charSet = charSet; 114 } 115 116 121 public void setContentType(String contentType) { 122 this.contentType = contentType; 123 } 124 125 130 public void setName(String name) { 131 if (name == null) { 132 throw new IllegalArgumentException ("Name must not be null"); 133 } 134 this.name = name; 135 } 136 137 143 public void setTransferEncoding(String transferEncoding) { 144 this.transferEncoding = transferEncoding; 145 } 146 147 } 148 | Popular Tags |