OOP MimeParser Version 3.5

com.bentofw.util
Class CheckPngLight

java.lang.Object
  extended by 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:



Constructor Summary
CheckPngLight()
          Constructor.
 
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
 

Constructor Detail

CheckPngLight

public CheckPngLight()
Constructor.

Method Detail

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.

OOP MimeParser Version 3.5

ALL CONTENTS COPYRIGHT 2005, OOP-Research Corporation. All rights reserved.
Any questions and comments are welcome to OOP-Research Corporation.