Package noaa.coastwatch.net
Class URLTransfer
java.lang.Object
noaa.coastwatch.io.DataTransfer
noaa.coastwatch.net.URLTransfer
- All Implemented Interfaces:
Runnable
The
URLTransfer
class initiates a connection to an
Internet host specified by a URL and downloads the content provided
by the URL. The URL may contain username and password information,
in which case the URL is opened using a
PasswordAuthentication
object as the default
authenticator for the connection.- Since:
- 3.1.5
- Author:
- Peter Hollemans
-
Constructor Summary
ConstructorDescriptionURLTransfer
(URL inputUrl, OutputStream output) Creates a new URL transfer with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
setupIO()
Overrides the parent to setup I/O streams.Methods inherited from class noaa.coastwatch.io.DataTransfer
abort, addDataTransferListener, close, getRate, getStartTime, getTransferred, removeDataTransferListener, run, setStreams
-
Constructor Details
-
URLTransfer
Creates a new URL transfer with the specified parameters.- Parameters:
inputUrl
- the URL to access for content.output
- the output stream for the URL contents.
-
-
Method Details
-
setupIO
Overrides the parent to setup I/O streams.- Overrides:
setupIO
in classDataTransfer
- Throws:
IOException
- if an error occurred accessing the URL stream.
-