Interface DownloadFilter
DownloadFilter allows you to filter out which objects should be downloaded as part of a DownloadDirectoryRequest. You could use it, for example, to only download objects of a given size, of a given file extension,
of a given last-modified date, etc. Multiple DownloadFilters can be composed together via and(Predicate) and
or(Predicate) methods.-
Method Summary
Modifier and TypeMethodDescriptionstatic DownloadFilterADownloadFilterthat downloads all non-folder objects.default DownloadFilterReturns a composed filter that represents the logical AND of this filter and another.default DownloadFilternegate()Returns a filter that represents the logical negation of this predicate.default DownloadFilterReturns a composed filter that represents the logical OR of this filter and another.booleanEvaluate condition the remoteS3Objectshould be downloaded.
-
Method Details
-
test
-
and
Returns a composed filter that represents the logical AND of this filter and another. The composed filter returns true only if both this filter and the other filter return true.- Specified by:
andin interfacePredicate<S3Object>- Parameters:
other- a predicate that will be logically-ANDed with this predicate- Returns:
- a composed filter that represents the logical AND of this filter and the other filter
- Throws:
NullPointerException- if other is null
-
or
Returns a composed filter that represents the logical OR of this filter and another. The composed filter returns true if either this filter or the other filter returns true.- Specified by:
orin interfacePredicate<S3Object>- Parameters:
other- a predicate that will be logically-ORed with this predicate- Returns:
- a composed filter that represents the logical OR of this filter and the other filter
- Throws:
NullPointerException- if other is null
-
negate
Returns a filter that represents the logical negation of this predicate. The returned filter returns true when this filter returns false, and vice versa. -
allObjects
ADownloadFilterthat downloads all non-folder objects. A folder is a 0-byte object created when a customer uses S3 console to create a folder, and it always ends with "/".This is the default behavior if no filter is provided.
-