|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.common.distribute.ExtendedFTPRemoteFile
public class ExtendedFTPRemoteFile
This class extends the functionality of FTPRemoteFile by allowing local input to be taken from an ArchiveRecord. It has factory methods which return an instance of FTPRemoteFile when a File is used as input so that behaviour is effectively delegated to that class when required.
Method Summary | |
---|---|
void |
appendTo(java.io.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(java.io.File destFile)
Copy remotefile to local disk storage. |
java.lang.String |
getChecksum()
Checksums are not available in this implementation. |
java.io.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(java.io.File localFile,
java.lang.Boolean useChecksums,
java.lang.Boolean fileDeletable,
java.lang.Boolean multipleDownloads)
This method returns an instance of FTPRemoteFile using the factory method with the same signature in that class. |
static RemoteFile |
getInstance(java.io.File localFile,
java.lang.Boolean useChecksums,
java.lang.Boolean fileDeletable,
java.lang.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. |
java.lang.String |
getName()
Return the file name. |
long |
getSize()
For an ARCRecord, this is the length of the record as defined in the header. |
java.lang.String |
toString()
A human readbale description of the object which should be sufficient to identify and track it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static RemoteFile getInstance(org.archive.io.ArchiveRecord record)
record
- the record
public static RemoteFile getInstance(org.archive.io.arc.ARCRecord record)
record
- the record
public static RemoteFile getInstance(org.archive.io.warc.WARCRecord record)
record
- the record
public static RemoteFile getInstance(java.io.File localFile, java.lang.Boolean useChecksums, java.lang.Boolean fileDeletable, java.lang.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(java.io.File localFile, java.lang.Boolean useChecksums, java.lang.Boolean fileDeletable, java.lang.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(java.io.File destFile)
RemoteFile
copyTo
in interface RemoteFile
destFile
- local Filepublic void appendTo(java.io.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 java.io.InputStream getInputStream()
RemoteFile
getInputStream
in interface RemoteFile
public java.lang.String getName()
RemoteFile
getName
in interface RemoteFile
public java.lang.String getChecksum()
getChecksum
in interface RemoteFile
public void cleanup()
cleanup
in interface RemoteFile
public long getSize()
getSize
in interface RemoteFile
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |