|
OOP MimeParser Version 3.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bentofw.util.ImageSizeChecker
public class ImageSizeChecker
Check width/height of the image file. Requires JDK 1.4 or later.
| Method Summary | |
|---|---|
void |
checkImageSize(byte[] bin,
java.lang.String mime,
java.lang.String filename,
int max_width,
int max_height)
Throws the exception if the width/height of the image file exceeds the maximum width/height. |
static ImageSizeChecker |
getInstance()
Reads ImageSizeChecker.properties and returns the instance of this class. |
void |
setDebug(boolean db)
|
void |
setLogger(GenericLogger logger)
Set GenericLogger object to which the log messages will be written. |
boolean |
shouldCheck(java.lang.String mime)
Returns true if the specified mime-type is the subject of this class. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ImageSizeChecker getInstance()
throws NoPropertyFileException,
NestedException
NoPropertyFileException
NestedExceptionpublic void setDebug(boolean db)
public boolean shouldCheck(java.lang.String mime)
mime - mime-type
public void checkImageSize(byte[] bin,
java.lang.String mime,
java.lang.String filename,
int max_width,
int max_height)
throws LargeImageException,
SimpleException,
CorruptedBinaryContentsException
bin - The binary contents of the image file to be
checked.mime - The mime-type of the image file to be checked.filename - The file name of the image file to be
checked.max_width - The maximum widthmax_height - The maximum height
LargeImageException
SimpleException
CorruptedBinaryContentsException
public void setLogger(GenericLogger logger)
GenericLogger object to which the log messages will be written.
logger - GenericLogger object to which the log messages will be
written.
|
OOP MimeParser Version 3.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ALL CONTENTS COPYRIGHT 2005, OOP-Research Corporation. All rights reserved.
Any questions and comments are welcome to OOP-Research Corporation.