Package adams.core.io.filecomplete
Class AbstractStrictCheckSizeFileCompleteCheck
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.core.io.filecomplete.AbstractFileCompleteCheck
-
- adams.core.io.filecomplete.AbstractStrictFileCompleteCheck
-
- adams.core.io.filecomplete.AbstractStrictCheckSizeFileCompleteCheck
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,Serializable
public abstract class AbstractStrictCheckSizeFileCompleteCheck extends AbstractStrictFileCompleteCheck
Ancestor for checks that look for EOF markers that can limit the number of bytes to read from the end of the file used to look for the EOF marker.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intm_CheckSizethe number of bytes to read from the end of the file to look for the EOF marker.-
Fields inherited from class adams.core.io.filecomplete.AbstractStrictFileCompleteCheck
m_Strict
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractStrictCheckSizeFileCompleteCheck()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringcheckSizeTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.intgetCheckSize()Returns the number of bytes to read from the back of the file (in non-strict mode) to check for EOF marker.protected intgetDefaultCheckSize()Returns the default check size to use.protected abstract intgetMinCheckSize()Returns the minimally allowed check size.protected booleanisCompleteEOF(File file, int bufLen)Checks whether the file is complete using the number of bytes from the end of the file.voidsetCheckSize(int value)Sets the number of bytes to read from the back of the file (in non-strict mode) to check for EOF marker.StringstrictTipText()Returns the tip text for this property.-
Methods inherited from class adams.core.io.filecomplete.AbstractStrictFileCompleteCheck
getStrict, setStrict
-
Methods inherited from class adams.core.io.filecomplete.AbstractFileCompleteCheck
isComplete, isComplete, read
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractStrictFileCompleteCheck
-
strictTipText
public String strictTipText()
Returns the tip text for this property.- Specified by:
strictTipTextin classAbstractStrictFileCompleteCheck- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultCheckSize
protected int getDefaultCheckSize()
Returns the default check size to use.- Returns:
- the default
-
getMinCheckSize
protected abstract int getMinCheckSize()
Returns the minimally allowed check size.- Returns:
- the minimum
-
setCheckSize
public void setCheckSize(int value)
Sets the number of bytes to read from the back of the file (in non-strict mode) to check for EOF marker.- Parameters:
value- the number of bytes
-
getCheckSize
public int getCheckSize()
Returns the number of bytes to read from the back of the file (in non-strict mode) to check for EOF marker.- Returns:
- the number of bytes
-
checkSizeTipText
public String checkSizeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
isCompleteEOF
protected boolean isCompleteEOF(File file, int bufLen)
Checks whether the file is complete using the number of bytes from the end of the file.- Parameters:
file- the file to checkbufLen- the buffer length to use- Returns:
- true if complete
-
-