@@ -116,10 +116,6 @@ public static Mimetype getInstance() {
116
116
* to find the corresponding mime type. If the file has no extension, or the extension is not
117
117
* available in the listing contained in this class, the default mimetype
118
118
* <code>application/octet-stream</code> is returned.
119
- * <p>
120
- * A file extension is one or more characters that occur after the last period (.) in the file's name.
121
- * If a file has no extension,
122
- * Guesses the mimetype of file data based on the file's extension.
123
119
*
124
120
* @param path the file whose extension may match a known mimetype.
125
121
* @return the file's mimetype based on its extension, or a default value of
@@ -132,18 +128,14 @@ public String getMimetype(Path path) {
132
128
if (file != null ) {
133
129
return getMimetype (file .toString ());
134
130
}
135
- return null ;
131
+ return MIMETYPE_OCTET_STREAM ;
136
132
}
137
133
138
134
/**
139
135
* Determines the mimetype of a file by looking up the file's extension in an internal listing
140
136
* to find the corresponding mime type. If the file has no extension, or the extension is not
141
137
* available in the listing contained in this class, the default mimetype
142
138
* <code>application/octet-stream</code> is returned.
143
- * <p>
144
- * A file extension is one or more characters that occur after the last period (.) in the file's name.
145
- * If a file has no extension,
146
- * Guesses the mimetype of file data based on the file's extension.
147
139
*
148
140
* @param file the file whose extension may match a known mimetype.
149
141
* @return the file's mimetype based on its extension, or a default value of
@@ -159,10 +151,6 @@ public String getMimetype(File file) {
159
151
* no extension, or the extension is not available in the listing contained
160
152
* in this class, the default mimetype <code>application/octet-stream</code>
161
153
* is returned.
162
- * <p>
163
- * A file extension is one or more characters that occur after the last
164
- * period (.) in the file's name. If a file has no extension, Guesses the
165
- * mimetype of file data based on the file's extension.
166
154
*
167
155
* @param fileName The name of the file whose extension may match a known
168
156
* mimetype.
0 commit comments