OOP MimeParser Version 3.5

com.bentofw.util
Interface BinaryChecker

All Known Implementing Classes:
com.bentofw.util.BinaryCheckerByImageIo, com.bentofw.util.BinaryCheckerByString, CheckBmpLight, CheckGifLight, CheckGifStrict, CheckJpegLight, CheckJpegStrict, CheckPdfLight, CheckPdfStrict, CheckPngLight, CheckPngStrict, CheckPsLight

public interface BinaryChecker

Given the binary contents, check if the file is the specific mime-type or not.

There is no guarantee that the implementation of this interface can always return the correct result. Some implementation will check only the first few bytes. Even if the first few bytes matche the patterns for the specific mime-type, there may be a case that the rest of the contents are invalid.

Since:
1.5
Author:
Jun Inamori

See Also:
MagicMime,

Method Summary
 boolean checkBinary(byte[] bin)
          Returns true if the binary contents can be considered to match the specific mime-type.
 

Method Detail

checkBinary

boolean checkBinary(byte[] bin)
Returns true if the binary contents can be considered to match the specific mime-type. Otherwise, false.

There is no guarantee that the implementation of this interface can always return the correct result. Some implementation will check only the first few bytes. Even if the first few bytes matche the patterns for the specific mime-type, there may be a case that the rest of the contents are invalid.

Parameters:
bin - The binary contents
Returns:
true if the binary contents can be considered to match the specific mime-type. 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.