Interface DownloadService.Manifest.Builder
- Enclosing interface:
- DownloadService.Manifest
public static interface DownloadService.Manifest.Builder
Builder for Manifest.
-
Method Summary
Modifier and TypeMethodDescriptionaddFileWithTargetDirectory
(URI sourceFileUri, File targetDirectory) Add a source file specifying a target directory.addFileWithTargetFile
(URI sourceFileUri, File targetFile) Add a source file specifying a target file destination.build()
Build the manifest.
-
Method Details
-
addFileWithTargetDirectory
DownloadService.Manifest.Builder addFileWithTargetDirectory(URI sourceFileUri, File targetDirectory) Add a source file specifying a target directory. The filename for the target is computed by using the last component of the resource path.- Parameters:
sourceFileUri
- source URISitargetDirectory
- target directory- Returns:
- a builder for chaining
-
addFileWithTargetFile
Add a source file specifying a target file destination.- Parameters:
sourceFileUri
- source URItargetFile
- target file- Returns:
- a builder for chaining
-
build
DownloadService.Manifest build()Build the manifest.- Returns:
- the manifest
- Throws:
IllegalArgumentException
- if two or more source URIs point to the same target file
-