Class TXTFileFilter
- java.lang.Object
-
- org.arakhne.afc.inputoutput.filefilter.AbstractFileFilter
-
- org.arakhne.afc.inputoutput.filefilter.TXTFileFilter
-
- All Implemented Interfaces:
FileFilter,FilenameFilter,FileFilter
public class TXTFileFilter extends AbstractFileFilter
File filter for text document.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:40
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- inputoutput
-
-
Field Summary
Fields Modifier and Type Field Description static StringEXTENSION_TEXTDefault extension for the text files.static StringEXTENSION_TXTDefault extension for the text files.
-
Constructor Summary
Constructors Constructor Description TXTFileFilter()Construct.TXTFileFilter(boolean acceptDirectories)Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisTextFile(File file)Replies if the specified file contains text.static booleanisTextFile(String file)Replies if the specified file contains text.static booleanisTextFile(URL file)Replies if the specified file contains text.-
Methods inherited from class org.arakhne.afc.inputoutput.filefilter.AbstractFileFilter
accept, accept, getDescription, getExtensions
-
-
-
-
Field Detail
-
EXTENSION_TXT
public static final String EXTENSION_TXT
Default extension for the text files.- See Also:
- Constant Field Values
-
EXTENSION_TEXT
public static final String EXTENSION_TEXT
Default extension for the text files.- See Also:
- Constant Field Values
-
-
Method Detail
-
isTextFile
public static boolean isTextFile(File file)
Replies if the specified file contains text.- Parameters:
file- is the file to test.- Returns:
trueif the given file contains text, otherwisefalse
-
isTextFile
public static boolean isTextFile(URL file)
Replies if the specified file contains text.- Parameters:
file- is the file to test.- Returns:
trueif the given file contains text, otherwisefalse
-
isTextFile
public static boolean isTextFile(String file)
Replies if the specified file contains text.- Parameters:
file- is the file to test.- Returns:
trueif the given file contains text, otherwisefalse
-
-