Interface DownloadFilter
-
public interface DownloadFilter extends Predicate<S3Object>
DownloadFilterallows you to filter out which objects should be downloaded as part of aDownloadDirectoryRequest. 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. MultipleDownloadFilters can be composed together viaand(Predicate)andor(Predicate)methods.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static DownloadFilterallObjects()ADownloadFilterthat downloads all non-folder objects.default DownloadFilterand(Predicate<? super S3Object> other)Returns 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 DownloadFilteror(Predicate<? super S3Object> other)Returns a composed filter that represents the logical OR of this filter and another.booleantest(S3Object s3Object)Evaluate condition the remoteS3Objectshould be downloaded.
-
-
-
Method Detail
-
and
default DownloadFilter and(Predicate<? super S3Object> other)
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
default DownloadFilter or(Predicate<? super S3Object> other)
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
default DownloadFilter 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
static DownloadFilter 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.
-
-