public class ImageConverter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
IMAGE_TYPE |
| Constructor and Description |
|---|
ImageConverter() |
| Modifier and Type | Method and Description |
|---|---|
static TypeAwareByteSource |
convert(com.google.common.io.ByteSource source)
Convert image to black and white colors
|
static TypeAwareByteSource |
convertIfImage(TypeAwareByteSource content) |
static boolean |
isImage(com.google.common.net.MediaType contentType)
Check is input file is image
|
static boolean |
isImage(java.lang.String contentType)
Check is input file is image
|
static boolean |
isImage(TypeAwareByteSource source)
Check is input file is image
|
public static final java.lang.String IMAGE_TYPE
public static TypeAwareByteSource convertIfImage(TypeAwareByteSource content)
public static TypeAwareByteSource convert(com.google.common.io.ByteSource source) throws java.io.IOException
source - Data SourceTypeAwareByteSourcejava.io.IOException - In case of IO exceptionpublic static boolean isImage(TypeAwareByteSource source)
source - DataSourcepublic static boolean isImage(com.google.common.net.MediaType contentType)
contentType - ContentTypepublic static boolean isImage(java.lang.String contentType)
contentType - ContentType