Package codes.thischwa.jii.core
Class iTextImageWrapper
- java.lang.Object
-
- codes.thischwa.jii.core.iTextImageWrapper
-
- All Implemented Interfaces:
IDimensionProvider
,IInfoProvider
,IResolutionProvider
public class iTextImageWrapper extends Object implements IDimensionProvider, IResolutionProvider
Wrapper to an internal class of iText.- Author:
- Thilo Schwarz
-
-
Constructor Summary
Constructors Constructor Description iTextImageWrapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Dimension
getDimension()
Obtain theDimension
of the current image.ImageType
getImageType()
Obtain theImageType
of the current image file.Resolution
getResolution()
Obtain theResolution
of the current image.ImageType[]
getSupportedTypes()
Return allImageType
s supported by the implemented class.void
set(File file)
Specify the imageFile
to be examine.void
set(InputStream in)
Specify theInputStream
of image file to be examine.
-
-
-
Method Detail
-
set
public void set(File file) throws FileNotFoundException, ReadException
Description copied from interface:IInfoProvider
Specify the imageFile
to be examine.- Specified by:
set
in interfaceIInfoProvider
- Parameters:
file
- The imageFile
to be examine.- Throws:
FileNotFoundException
- If the file to be examine couldn't find.ReadException
- If the required reading operation fails.
-
set
public void set(InputStream in) throws ReadException, UnsupportedOperationException
Description copied from interface:IInfoProvider
Specify theInputStream
of image file to be examine.- Specified by:
set
in interfaceIInfoProvider
- Parameters:
in
- TheInputStream
of the image file to be examine.- Throws:
ReadException
- If the required reading operation fails.UnsupportedOperationException
- If the implemented class doesn't provide support forInputStream
s.
-
getImageType
public ImageType getImageType()
Description copied from interface:IInfoProvider
Obtain theImageType
of the current image file.- Specified by:
getImageType
in interfaceIInfoProvider
- Returns:
- The
ImageType
of the current image file.
-
getDimension
public Dimension getDimension() throws ReadException
Description copied from interface:IDimensionProvider
Obtain theDimension
of the current image.- Specified by:
getDimension
in interfaceIDimensionProvider
- Returns:
- The
Dimension
of the current image. - Throws:
ReadException
- If the required operations to determine the dimension fail.
-
getResolution
public Resolution getResolution() throws ReadException
Description copied from interface:IResolutionProvider
Obtain theResolution
of the current image.- Specified by:
getResolution
in interfaceIResolutionProvider
- Returns:
- The
Resolution
of the current image. - Throws:
ReadException
- If the required operations to determine the resolution fail.
-
getSupportedTypes
public ImageType[] getSupportedTypes()
Description copied from interface:IInfoProvider
Return allImageType
s supported by the implemented class.- Specified by:
getSupportedTypes
in interfaceIInfoProvider
- Returns:
- A set of
ImageType
s.
-
-