| Modifier and Type | Field and Description |
|---|---|
| private static final String | TSPECIALS
Special characters |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected final String | Returns: The characters after the first dot or an empty string.A file name name)Returns the extension of a file name, specifically the portion of the parameter string after the first dot. |
| protected abstract String | |
| private static boolean | |
| private static boolean | |
| private static String | |
| public final String | probeContentType(Path file)
Implements abstract java. Invokes the appropriate probe method to guess a file's content type, and checks that the content type's syntax is valid. |
| TSPECIALS | back to summary |
|---|---|
| private static final String TSPECIALS Special characters | |
| AbstractFileTypeDetector | back to summary |
|---|---|
| protected AbstractFileTypeDetector() | |
| getExtension | back to summary |
|---|---|
| protected final String getExtension(String name) Returns the extension of a file name, specifically the portion of the
parameter string after the first dot. If the parameter is | |
| implProbeContentType | back to summary |
|---|---|
| protected abstract String implProbeContentType(Path file) throws IOException Probes the given file to guess its content type. | |
| isTokenChar | back to summary |
|---|---|
| private static boolean isTokenChar(char c) Returns true if the character is a valid token character. | |
| isValidToken | back to summary |
|---|---|
| private static boolean isValidToken(String s) Returns true if the given string is a legal type or subtype. | |
| parse | back to summary |
|---|---|
| private static String parse(String s) Parses a candidate content type into its type and subtype, returning null if either token is invalid. | |
| probeContentType | back to summary |
|---|---|
| public final String probeContentType(Path file) throws IOException Implements abstract java. Invokes the appropriate probe method to guess a file's content type, and checks that the content type's syntax is valid.
| |