|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.common.distribute.NullRemoteFile
public class NullRemoteFile
This is an implementation of RemoteFile which does nothing and can therefore be used in batch jobs for which no output is required.
Constructor Summary | |
---|---|
NullRemoteFile()
|
Method Summary | |
---|---|
void |
appendTo(java.io.OutputStream out)
Write the contents of this remote file to an output stream. |
void |
cleanup()
Cleanup this remote file. |
void |
copyTo(java.io.File destFile)
Copy remotefile to local disk storage. |
java.lang.String |
getChecksum()
Returns a MD5 Checksum on the file. |
java.io.InputStream |
getInputStream()
Get an inputstream that contains the data transferred in this RemoteFile. |
static RemoteFile |
getInstance(java.io.File f,
java.lang.Boolean useChecksums,
java.lang.Boolean fileDeletable,
java.lang.Boolean multipleDownloads)
|
java.lang.String |
getName()
Return the file name. |
long |
getSize()
Returns the total size of the remote file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NullRemoteFile()
Method Detail |
---|
public static RemoteFile getInstance(java.io.File f, java.lang.Boolean useChecksums, java.lang.Boolean fileDeletable, java.lang.Boolean multipleDownloads)
RemoteFileFactory.getInstance(File, boolean, boolean, boolean)
public void copyTo(java.io.File destFile)
RemoteFile
copyTo
in interface RemoteFile
destFile
- local FileRemoteFile.copyTo(File)
public 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.RemoteFile.appendTo(OutputStream)
public java.io.InputStream getInputStream()
RemoteFile
getInputStream
in interface RemoteFile
public void cleanup()
RemoteFile
cleanup
in interface RemoteFile
RemoteFile.cleanup()
public long getSize()
RemoteFile
getSize
in interface RemoteFile
RemoteFile.getSize()
public java.lang.String getName()
getName
in interface RemoteFile
RemoteFile.getName()
public java.lang.String getChecksum() throws NotImplementedException
getChecksum
in interface RemoteFile
NotImplementedException
- Because it is not implementedRemoteFile.getChecksum()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |