Class URLTransfer

java.lang.Object
noaa.coastwatch.io.DataTransfer
noaa.coastwatch.net.URLTransfer
All Implemented Interfaces:
Runnable

public class URLTransfer extends DataTransfer
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 Details

    • URLTransfer

      public URLTransfer(URL inputUrl, OutputStream output)
      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

      protected void setupIO() throws IOException
      Overrides the parent to setup I/O streams.
      Overrides:
      setupIO in class DataTransfer
      Throws:
      IOException - if an error occurred accessing the URL stream.