Package org.apache.commons.vfs2.filter
Class SizeRangeFileFilter
java.lang.Object
org.apache.commons.vfs2.filter.SizeRangeFileFilter
- All Implemented Interfaces:
Serializable
,FileFilter
Filter that accepts files whose size is >= minimum size and <= maximum
size.
- Since:
- 2.4
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSizeRangeFileFilter
(long minSizeInclusive, long maxSizeInclusive) Constructor with sizes. -
Method Summary
Modifier and TypeMethodDescriptionboolean
accept
(FileSelectInfo fileSelectInfo) Determines if a file or folder should be selected.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
filter
-
-
Constructor Details
-
SizeRangeFileFilter
public SizeRangeFileFilter(long minSizeInclusive, long maxSizeInclusive) Constructor with sizes.- Parameters:
minSizeInclusive
- the minimum file size (inclusive)maxSizeInclusive
- the maximum file size (inclusive)
-
-
Method Details
-
accept
Description copied from interface:FileFilter
Determines if a file or folder should be selected.- Specified by:
accept
in interfaceFileFilter
- Parameters:
fileSelectInfo
- the file or folder to select.- Returns:
- true if the file should be selected.
- Throws:
FileSystemException
- Thrown for file system errors (since 2.4.)
-