com.bentofw.util
Class CheckPngLight
java.lang.Object
com.bentofw.util.CheckPngLight
- All Implemented Interfaces:
- BinaryChecker
public class CheckPngLight
- extends java.lang.Object
- implements BinaryChecker
One of the implementation of BinaryChecker. Check if
the given binary contents matches PNG file or not.
There is no guarantee that
this implementation can always return
the correct result.
This implementation checks only the first few bytes.
Even if the first few bytes matche the patterns for the
PNG, there may be a case that the rest of
the contents are invalid.
- Since:
- 1.5
- Author:
- Jun Inamori
- See Also:
|
Method Summary |
boolean |
checkBinary(byte[] bin)
Returns true if the binary contents can be considered
to match PNG file. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CheckPngLight
public CheckPngLight()
- Constructor.
checkBinary
public boolean checkBinary(byte[] bin)
- Returns true if the binary contents can be considered
to match PNG file. Otherwise, false.
There is no guarantee that the
implementation of this interface can always return
the correct result.
This implementation will check only the first few bytes.
Even if the first few bytes matche the patterns for the
PNG file, there may be a case that the rest of
the contents are invalid.
- Specified by:
checkBinary in interface BinaryChecker
- Parameters:
bin - The binary contents
- Returns:
- true if the binary contents can be considered
to match the PNG file. Otherwise, false.
ALL CONTENTS COPYRIGHT 2005, OOP-Research Corporation. All rights reserved.
Any questions and comments are welcome to OOP-Research Corporation.