org.springframework.roo.classpath.operations.jsr303
Enum UploadedFileContentType
java.lang.Object
java.lang.Enum<UploadedFileContentType>
org.springframework.roo.classpath.operations.jsr303.UploadedFileContentType
- All Implemented Interfaces:
- Serializable, Comparable<UploadedFileContentType>
public enum UploadedFileContentType
- extends Enum<UploadedFileContentType>
The Internet media type or content-type of an uploaded file.
Only common content types are included.
- Since:
- 1.2.0
- Author:
- Alan Stewart
CSS
public static final UploadedFileContentType CSS
CSV
public static final UploadedFileContentType CSV
DOC
public static final UploadedFileContentType DOC
GIF
public static final UploadedFileContentType GIF
HTML
public static final UploadedFileContentType HTML
JAVASCRIPT
public static final UploadedFileContentType JAVASCRIPT
JPG
public static final UploadedFileContentType JPG
JSON
public static final UploadedFileContentType JSON
MP3
public static final UploadedFileContentType MP3
MP4
public static final UploadedFileContentType MP4
MPEG
public static final UploadedFileContentType MPEG
PDF
public static final UploadedFileContentType PDF
PNG
public static final UploadedFileContentType PNG
TXT
public static final UploadedFileContentType TXT
XLS
public static final UploadedFileContentType XLS
XML
public static final UploadedFileContentType XML
ZIP
public static final UploadedFileContentType ZIP
values
public static UploadedFileContentType[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (UploadedFileContentType c : UploadedFileContentType.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static UploadedFileContentType valueOf(String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name - the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null
getFileExtension
public static UploadedFileContentType getFileExtension(String contentType)
getContentType
public String getContentType()
Copyright © 2009–2015. All rights reserved.