public class TestRemoteFile extends HTTPRemoteFile implements RemoteFile
Created by IntelliJ IDEA. User: csr Date: Mar 2, 2005 Time: 3:09:26 PM
Modifier and Type | Field and Description |
---|---|
boolean |
failsOnCopy |
static Map<RemoteFile,String> |
remainingRemoteFiles |
checksum, hostname, HTTPREMOTEFILE_PORT_NUMBER, url
file, fileDeletable, filesize, multipleDownloads, useChecksums
Constructor and Description |
---|
TestRemoteFile(File localFile,
boolean useChecksum,
boolean fileDeletable,
boolean multipleDownloads) |
Modifier and Type | Method and Description |
---|---|
void |
appendTo(OutputStream out)
Append this remote file to the given output stream.
|
void |
cleanup()
Invalidate all file handles, by asking the remote registry to remove the url for this remote file from the list
of shared files.
|
void |
copyTo(File destFile)
Copy this remote file to the given file.
|
File |
getFile() |
static RemoteFile |
getInstance(File remoteFile,
Boolean useChecksums,
Boolean fileDeletable,
Boolean multipleDownloads) |
boolean |
isDeleted() |
protected boolean |
isLocal()
Helper method to determine if file resides on local machine.
|
static Set<RemoteFile> |
remainingFiles()
Give the set of remaining remote files.
|
static void |
removeRemainingFiles()
Remove any remote files that may have been left over.
|
String |
toString() |
getChecksum, getInputStream, getNumberOfRetries, getRegistry
getName, getSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChecksum, getInputStream, getName, getSize
public boolean failsOnCopy
public static Map<RemoteFile,String> remainingRemoteFiles
public TestRemoteFile(File localFile, boolean useChecksum, boolean fileDeletable, boolean multipleDownloads) throws IOFailure
IOFailure
public static RemoteFile getInstance(File remoteFile, Boolean useChecksums, Boolean fileDeletable, Boolean multipleDownloads) throws IOFailure
IOFailure
public void copyTo(File destFile)
HTTPRemoteFile
copyTo
in interface RemoteFile
copyTo
in class HTTPRemoteFile
destFile
- The file to write the remote file to.public void appendTo(OutputStream out)
AbstractRemoteFile
appendTo
in interface RemoteFile
appendTo
in class AbstractRemoteFile
out
- The stream to write the remote file to.public void cleanup()
HTTPRemoteFile
cleanup
in interface RemoteFile
cleanup
in class HTTPRemoteFile
public boolean isDeleted()
public static void removeRemainingFiles()
public static Set<RemoteFile> remainingFiles()
protected boolean isLocal()
HTTPRemoteFile
isLocal
in class HTTPRemoteFile
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.