MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / isJPEG

Method isJPEG

CodenameOne/src/com/codename1/ui/Image.java:930–933  ·  view source on GitHub ↗
(InputStream inputStream)

Source from the content-addressed store, hash-verified

928 ///
929 /// true if jpeg, false otherwise
930 public static boolean isJPEG(InputStream inputStream) throws IOException {
931 String type = Util.guessMimeType(inputStream);
932 return "image/jpeg".equals(type) || "image/jpg".equals(type);
933 }
934
935 /// Very fast method to detect if the given inputStream is a PNG image
936 /// (according to its guessed mime type)

Callers 1

exifRotationMethod · 0.95

Calls 2

guessMimeTypeMethod · 0.95
equalsMethod · 0.65

Tested by

no test coverage detected