Class BMP

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, SizeOfHandler, Serializable

    public class BMP
    extends AbstractStrictFileCompleteCheck
    Checks whether the BMP file has sufficient bytes according to its header.
    See also:
    https://en.wikipedia.org/wiki/BMP_file_format#File_structure

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
        min-user-mode: Expert
     
    -strict <boolean> (property: strict)
        Whether to be strict or allow trailing junk data.
        default: true
     
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • BMP

        public BMP()
    • Method Detail

      • strictTipText

        public String strictTipText()
        Returns the tip text for this property.
        Specified by:
        strictTipText in class AbstractStrictFileCompleteCheck
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • checkLength

        protected boolean checkLength​(byte[] buffer,
                                      long actLen)
        Checks whether the length in the header works with the actual data length.
        Parameters:
        buffer - the header
        actLen - the actual amount of data
        Returns:
        true if valid
      • isComplete

        public boolean isComplete​(byte[] buffer)
        Checks whether the byte buffer is complete.
        Specified by:
        isComplete in class AbstractFileCompleteCheck
        Parameters:
        buffer - the buffer to check
        Returns:
        true if complete
      • isComplete

        public boolean isComplete​(File file)
        Checks whether the file is in use.
        Specified by:
        isComplete in class AbstractFileCompleteCheck
        Parameters:
        file - the file to check
        Returns:
        true if complete