public class ImageFileConversionInfo extends Object
UploadPolicy.PROP_TARGET_PICTURE_FORMAT
parameter and provide easy
access to the conversions
"png,bmp:jpg;gif:png;"
UploadPolicy
Constructor and Description |
---|
ImageFileConversionInfo(String conversionList)
will build a new ImageFileConversionInfo object for the given
conversionList.
|
Modifier and Type | Method and Description |
---|---|
String |
getTargetFormat(String sourceFormat)
returns the target format for the given sourceFormat.
|
String |
getTargetFormatOrNull(String sourceFormat)
returns the target format (in lowercase) for the given sourceFormat or
null if no conversion is necessary (or if sourceFormat is null ) |
String |
toString() |
public ImageFileConversionInfo(String conversionList) throws JUploadException
conversionList
- e.g. "png,bmp:jpg;gif:png;"
, may be empty
or null
JUploadException
- if the conversionList is erroneouspublic String getTargetFormatOrNull(String sourceFormat)
null
if no conversion is necessary (or if sourceFormat is null
)sourceFormat
- format of the source file (case does not matter):
e.g. jpg, JpeG, png, ..null
if no conversion is necessary (or if sourceFormat is
null
)public String getTargetFormat(String sourceFormat)
null
, null
will be returnedsourceFormat
- format of the source file (case does not matter):
e.g. jpg, JpeG, png, ..public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.