|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.randomcoder.download.FileSpec
public class FileSpec
JavaBean which holds details for a downloadable file.
Copyright (c) 2007, Craig Condit. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
| Constructor Summary | |
|---|---|
FileSpec()
|
|
| Method Summary | |
|---|---|
protected Object |
clone()
Clones this object. |
int |
compareTo(FileSpec obj)
Compares this FileSpec to another FileSpec. |
String |
getDownloadLink()
Gets the URL where this file may be downloaded. |
String |
getFileName()
Gets the name of this file (without path information). |
long |
getFileSize()
Gets the file size in bytes, or -1 if unknown. |
String |
getFileType()
Gets the type of this file. |
Date |
getLastModified()
Gets the last modified date of this file, or null if unknown. |
String |
getMd5Link()
Gets the URL where an MD5 checksum of this file may be located, or null if no MD5 checksum is available. |
String |
getSha1Link()
Gets the URL where an SHA-1 checksum of this file may be located, or null if no SHA-1 checksum is available. |
void |
setDownloadLink(String downloadLink)
Sets the URL where this file may be downloaded. |
void |
setFileName(String fileName)
Sets the name of this file (without path information). |
void |
setFileSize(long fileSize)
Sets the file size in bytes, or -1 if unknown. |
void |
setFileType(String fileType)
Sets the type of this file. |
void |
setLastModified(Date lastModified)
Sets the last modified date of this file, or null if unknown. |
void |
setMd5Link(String md5Link)
Gets the URL where an MD5 checksum of this file may be located, or null if no MD5 checksum is available. |
void |
setSha1Link(String sha1Link)
Gets the URL where an SHA-1 checksum of this file may be located, or null if no SHA-1 checksum is available. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileSpec()
| Method Detail |
|---|
public String getDownloadLink()
public void setDownloadLink(String downloadLink)
downloadLink - download urlpublic long getFileSize()
public void setFileSize(long fileSize)
fileSize - public String getMd5Link()
public void setMd5Link(String md5Link)
md5Link - md5 checksum urlpublic String getSha1Link()
public void setSha1Link(String sha1Link)
sha1Link - sha1 checksum urlpublic String getFileName()
public void setFileName(String fileName)
fileName - file namepublic Date getLastModified()
public void setLastModified(Date lastModified)
lastModified - last modified datepublic String getFileType()
public void setFileType(String fileType)
fileType - file typepublic int compareTo(FileSpec obj)
compareTo in interface Comparable<FileSpec>obj - FileSpec to compare
obj
protected Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException - never
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||