public interface MediaTypePredictor
Modifier and Type | Method and Description |
---|---|
MediaType |
getMediaTypeFromFile(File file)
Get the media type from a file name.
|
MediaType |
getMediaTypeFromFileName(String fileName)
Get the media type from a file name.
|
MediaType getMediaTypeFromFile(File file)
file
- the file from which to get the MediaType
.MediaType
for the give file; null
- if file
is null; "application/octet-stream" if extension not recognized.DefaultMediaTypePredictor.CommonMediaTypes.getMediaTypeFromFileName(java.lang.String)
Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.