Class TextReader

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

    public class TextReader
    extends AbstractFileUseCheck
    Uses the specified text reader to load the file for checking the 'in use' state: if reading fails, then it is assumed the file is in use.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -reader <adams.data.io.input.AbstractTextReader> (property: reader)
        The text reader to use for checking the 'in use' state.
        default: adams.data.io.input.LineArrayTextReader
     
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • TextReader

        public TextReader()
    • Method Detail

      • setReader

        public void setReader​(AbstractTextReader value)
        Sets the text reader to use for checking the file use.
        Parameters:
        value - the reader
      • getReader

        public AbstractTextReader getReader()
        Returns the text reader to use for checking the file use.
        Returns:
        the reader
      • readerTipText

        public String readerTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • isInUse

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