OOP MimeParser Version 3.5

com.bentofw.util
Class CheckJpegLight

java.lang.Object
  extended by com.bentofw.util.CheckJpegLight
All Implemented Interfaces:
BinaryChecker

public class CheckJpegLight
extends java.lang.Object
implements BinaryChecker

One of the implementation of BinaryChecker. Check if the given binary contents matches JPEG 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 JPEG, there may be a case that the rest of the contents are invalid.

Since:
1.5
Author:
Jun Inamori
See Also:



Constructor Summary
CheckJpegLight()
           
 
Method Summary
 boolean checkBinary(byte[] bin)
          One of the implementation of .
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckJpegLight

public CheckJpegLight()
Method Detail

checkBinary

public boolean checkBinary(byte[] bin)
One of the implementation of . Check if the given binary contents matches JPEG 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 JPEG, 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 JPEG 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.