MCPcopy Create free account
hub / github.com/Jarrettluo/all-docs / getDocType

Method getDocType

src/main/java/com/jiaruiblog/enums/DocType.java:29–60  ·  view source on GitHub ↗
(String suffixName)

Source from the content-addressed store, hash-verified

27 UNKNOWN;
28
29 public static DocType getDocType(String suffixName) {
30 if (StringUtils.isNoneBlank(suffixName)) {
31 suffixName = StringUtils.toRootLowerCase(suffixName);
32 }
33 switch (suffixName) {
34 case ".pdf":
35 return PDF;
36 case ".docx":
37 return DOCX;
38 case ".pptx":
39 return PPTX;
40 case ".xlsx":
41 return XLSX;
42 case ".md":
43 return MD;
44 case ".html":
45 case ".xhtml":
46 case ".xht":
47 case ".htm":
48 return HTML;
49 case ".txt":
50 return TXT;
51 case ".jpeg":
52 return JPEG;
53 case ".jpg":
54 return JPG;
55 case ".png":
56 return PNG;
57 default:
58 return UNKNOWN;
59 }
60 }
61}

Callers 1

MainTaskMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected