Class SimpleImageInfo
- java.lang.Object
-
- org.nuxeo.ecm.core.opencmis.impl.util.SimpleImageInfo
-
public class SimpleImageInfo extends Object
A Java class to determine image width, height, length and MIME types for a number of image file formats without loading the whole image data.
-
-
Constructor Summary
Constructors Constructor Description SimpleImageInfo(InputStream stream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfinishStream()intgetHeight()longgetLength()StringgetMimeType()intgetWidth()protected voidprocessStream()protected intread()protected intreadInt(int noOfBytes, boolean bigEndian)protected voidskip(int n)
-
-
-
Field Detail
-
width
protected int width
-
height
protected int height
-
length
protected long length
-
mimeType
protected String mimeType
-
in
protected InputStream in
-
-
Constructor Detail
-
SimpleImageInfo
public SimpleImageInfo(InputStream stream) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
getLength
public long getLength()
-
getMimeType
public String getMimeType()
-
processStream
protected void processStream() throws IOException- Throws:
IOException
-
read
protected int read() throws IOException- Throws:
IOException
-
skip
protected void skip(int n) throws IOException- Throws:
IOException
-
finishStream
protected void finishStream() throws IOException- Throws:
IOException
-
readInt
protected int readInt(int noOfBytes, boolean bigEndian) throws IOException- Throws:
IOException
-
-