|
|
@@ -8,18 +8,18 @@ import java.util.Map;
|
|
|
* @date 2023-06-13 15:09:09
|
|
|
*/
|
|
|
public enum ObjectType {
|
|
|
- Dir(1000, "directory"),
|
|
|
- Image(1001, "image"),
|
|
|
- Video(1002, "video"),
|
|
|
- Audio(1003, "audio"),
|
|
|
- Text(1004, "text"),
|
|
|
- Other(1005, "application");
|
|
|
+ Dir(1000, "Dir"),
|
|
|
+ Image(1001, "Image"),
|
|
|
+ Video(1002, "Video"),
|
|
|
+ Audio(1003, "Audio"),
|
|
|
+ Text(1004, "Text"),
|
|
|
+ Other(1005, "Application");
|
|
|
|
|
|
private final int code;
|
|
|
- private final String desc;
|
|
|
- ObjectType(int code, String desc) {
|
|
|
+ private final String contentType;
|
|
|
+ ObjectType(int code, String contentType) {
|
|
|
this.code = code;
|
|
|
- this.desc = desc;
|
|
|
+ this.contentType = contentType;
|
|
|
}
|
|
|
|
|
|
private static Map<Integer, ObjectType> map = new HashMap<>();
|
|
|
@@ -32,7 +32,7 @@ public enum ObjectType {
|
|
|
private static Map<Integer, String> descMap = new HashMap<>();
|
|
|
static {
|
|
|
for (ObjectType objectType : ObjectType.values()) {
|
|
|
- descMap.put(objectType.code, objectType.desc);
|
|
|
+ descMap.put(objectType.code, objectType.contentType);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -56,7 +56,7 @@ public enum ObjectType {
|
|
|
}
|
|
|
|
|
|
public String getDesc() {
|
|
|
- return desc;
|
|
|
+ return contentType;
|
|
|
}
|
|
|
|
|
|
public static String getDescByCode(int code) {
|