|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--com.faa.dom.tutorial.URLSaver
This class saves the contents of a given URL to a local disk
Fields inherited from class java.lang.Thread |
MAX_PRIORITY,
MIN_PRIORITY,
NORM_PRIORITY |
Constructor Summary | |
URLSaver(java.lang.String newBaseURL,
java.lang.String newBaseDir)
A Constructor that sets the base URL and Base directories. |
Method Summary | |
void |
run()
|
void |
saveURL(java.lang.String url)
save url using the name of the file on the url and the default directory |
void |
saveURLAs(java.lang.String url,
java.lang.String filename)
Save the given URL to a file, using a particular filename. |
Methods inherited from class java.lang.Thread |
activeCount,
checkAccess,
countStackFrames,
currentThread,
destroy,
dumpStack,
enumerate,
getContextClassLoader,
getName,
getPriority,
getThreadGroup,
interrupt,
interrupted,
isAlive,
isDaemon,
isInterrupted,
join,
join,
join,
resume,
setContextClassLoader,
setDaemon,
setName,
setPriority,
sleep,
sleep,
start,
stop,
stop,
suspend,
toString,
yield |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public URLSaver(java.lang.String newBaseURL, java.lang.String newBaseDir) throws java.net.MalformedURLException
baseURL
- a base URL String for subsequent calls to saveURLAs. Note that
this doesn't mean the URLSaver cannot be used to save URLs outside the base.
It is just a matter of convenience.baseDir
- a base Directory name for subsequent calls to saveURLAsMethod Detail |
public void saveURLAs(java.lang.String url, java.lang.String filename) throws java.net.MalformedURLException, java.io.IOException
url
- the source URLfilename
- the target filenamepublic void saveURL(java.lang.String url) throws java.net.MalformedURLException, java.io.IOException
String
- url the target urlpublic void run()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |