public class HttpFile
extends java.io.File
| Modifier and Type | Field and Description | 
|---|---|
| private java.lang.String | filenameThe filename. | 
| private boolean | isReadThe is read. | 
| private boolean | isValidThe is valid. | 
| protected org.apache.log4j.Logger | loggerThe logger. | 
| private static java.lang.String | PROP_FILEThe Constant PROP_FILE. | 
| private java.lang.String | uploadDirThe upload dir. | 
| private java.lang.String | urlThe url. | 
| Constructor and Description | 
|---|
| HttpFile(java.lang.String url,
        java.lang.String filename)Instantiates a new http file. | 
| Modifier and Type | Method and Description | 
|---|---|
| private java.lang.Boolean | checkUrl(java.lang.String url)check url for readability,. | 
| boolean | isValid()Checks the valid flag | 
| static void | main(java.lang.String[] args)The main method. | 
| void | print()Prints the file to System.out. | 
| boolean | read()write contents of the URL to a file name specified. | 
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURLprotected org.apache.log4j.Logger logger
private static final java.lang.String PROP_FILE
private java.lang.String uploadDir
private boolean isValid
private boolean isRead
private java.lang.String filename
private java.lang.String url
public HttpFile(java.lang.String url,
        java.lang.String filename)
url - the url we're reading fromfilename - the filename to save this to once it's been pulled downpublic boolean read()
private java.lang.Boolean checkUrl(java.lang.String url)
url - the url we're testingpublic boolean isValid()
public void print()
public static void main(java.lang.String[] args)
args - the arguments