public class ExtendedFTPRemoteFile extends Object implements RemoteFile
Modifier and Type | Method and Description |
---|---|
void |
appendTo(OutputStream out)
Write the contents of this remote file to an output stream.
|
void |
cleanup()
The cleanup to be effected is deletion of the intermediate file from the ftp server.
|
void |
copyTo(File destFile)
Copy remotefile to local disk storage.
|
String |
getChecksum()
Checksums are not available in this implementation.
|
InputStream |
getInputStream()
Get an inputstream that contains the data transferred in this RemoteFile.
|
static RemoteFile |
getInstance(org.archive.io.ArchiveRecord record)
Create an instance of this class connected to an ARC or WARC record.
|
static RemoteFile |
getInstance(org.archive.io.arc.ARCRecord record)
Create an instance of this class connected to an ARCRecord.
|
static RemoteFile |
getInstance(File localFile,
Boolean useChecksums,
Boolean fileDeletable,
Boolean multipleDownloads)
This method returns an instance of FTPRemoteFile using the factory method with the same signature in that class.
|
static RemoteFile |
getInstance(File localFile,
Boolean useChecksums,
Boolean fileDeletable,
Boolean multipleDownloads,
RemoteFileSettings connectionParams)
This method returns an instance of FTPRemoteFile using the factory method with the same signature in that class.
|
static RemoteFile |
getInstance(org.archive.io.warc.WARCRecord record)
Create an instance of this class connected to a WARCRecord.
|
String |
getName()
Return the file name.
|
long |
getSize()
For an ARCRecord, this is the length of the record as defined in the header.
|
String |
toString()
A human readable description of the object which should be sufficient to identify and track it.
|
public static RemoteFile getInstance(org.archive.io.ArchiveRecord record)
record
- the recordpublic static RemoteFile getInstance(org.archive.io.arc.ARCRecord record)
record
- the recordpublic static RemoteFile getInstance(org.archive.io.warc.WARCRecord record)
record
- the recordpublic static RemoteFile getInstance(File localFile, Boolean useChecksums, Boolean fileDeletable, Boolean multipleDownloads) throws IOFailure
localFile
- File object for the remote fileuseChecksums
- If true, checksums will be used to check transfers.fileDeletable
- If true, this file will be deleted after upload to FTP.multipleDownloads
- If true, the file will not be removed from FTP server automatically after first
download.IOFailure
- if FTPRemoteFile creation failspublic static RemoteFile getInstance(File localFile, Boolean useChecksums, Boolean fileDeletable, Boolean multipleDownloads, RemoteFileSettings connectionParams) throws IOFailure
localFile
- File object for the remote fileuseChecksums
- If true, checksums will be used to check transfers.fileDeletable
- If true, this file will be deleted after upload to FTP.multipleDownloads
- If true, the file will not be removed from FTP server automatically after first
download.IOFailure
- if FTPRemoteFile creation failspublic void copyTo(File destFile)
RemoteFile
copyTo
in interface RemoteFile
destFile
- local Filepublic void appendTo(OutputStream out)
RemoteFile
appendTo
in interface RemoteFile
out
- OutputStream that the data will be written to. This stream will not be closed by this operation.public InputStream getInputStream()
RemoteFile
getInputStream
in interface RemoteFile
public String getName()
RemoteFile
getName
in interface RemoteFile
public String getChecksum()
getChecksum
in interface RemoteFile
public void cleanup()
cleanup
in interface RemoteFile
public long getSize()
getSize
in interface RemoteFile
Copyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.