Package ai.nexconn.chatui.picture.config
Class PictureMimeType
-
- All Implemented Interfaces:
public final class PictureMimeType
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringJPEGpublic final static StringPNGpublic final static StringDCIMpublic final static StringMIME_TYPE_IMAGEpublic final static StringMIME_TYPE_VIDEOpublic final static StringMIME_TYPE_PREFIX_IMAGEpublic final static StringMIME_TYPE_PREFIX_VIDEO
-
Constructor Summary
Constructors Constructor Description PictureMimeType()
-
Method Summary
Modifier and Type Method Description final static intofAll()final static intofImage()final static intofVideo()final static StringofPNG()final static StringofJPEG()final static StringofBMP()final static StringofGIF()final static StringofWEBP()final static Stringof3GP()final static StringofMP4()final static StringofMPEG()final static StringofAVI()static intisPictureType(String pictureType)static booleanisGif(String mimeType)Check whether it is a GIF static booleanisVideo(String pictureType)Check whether it is a video static booleaneqVideo(String mimeType)Check whether it is a video static booleaneqImage(String mimeType)Check whether it is an image static booleanisHttp(String path)Check whether it is a network image static StringfileToType(File file)Determine whether the file type is image or video static booleanmimeToEqual(String p1, String p2)is type Equal static booleanisMimeTypeSame(String oldMimeType, String newMimeType)Check whether it is the same type static StringgetImageMimeType(String path)static StringgetMimeType(Context context, Uri uri)Get MIME type from URI static intgetMimeType(String mimeType)Picture or video static StringgetLastImgType(String path)Get image file extension static StringgetLastImgSuffix(String mineType)Get image suffix from MIME type static Strings(Context context, String mimeType)Return different error messages based on type -
-
Method Detail
-
ofAll
final static int ofAll()
-
ofImage
final static int ofImage()
-
ofVideo
final static int ofVideo()
-
isPictureType
@Deprecated() static int isPictureType(String pictureType)
-
isVideo
@Deprecated() static boolean isVideo(String pictureType)
Check whether it is a video
-
fileToType
static String fileToType(File file)
Determine whether the file type is image or video
-
mimeToEqual
@Deprecated() static boolean mimeToEqual(String p1, String p2)
is type Equal
-
isMimeTypeSame
static boolean isMimeTypeSame(String oldMimeType, String newMimeType)
Check whether it is the same type
-
getImageMimeType
static String getImageMimeType(String path)
-
getMimeType
static String getMimeType(Context context, Uri uri)
Get MIME type from URI
-
getMimeType
static int getMimeType(String mimeType)
Picture or video
-
getLastImgType
static String getLastImgType(String path)
Get image file extension
-
getLastImgSuffix
static String getLastImgSuffix(String mineType)
Get image suffix from MIME type
-
-
-
-