up previous next contents
Next: Threads Up: Java networking Previous: URL   Contents

URLConnection

  • Created from a URL object using openConnection().
      URL url = new URL("http://www.devdaily.com");
      URLConnection uc = url.openConnection();
    
  • getInputStream() - read data from the server.
  • getContentType() - returns the MIME content type of the data.
  • getContentLength() - returns the number of bytes in the content.


up previous next contents
Next: Threads Up: Java networking Previous: URL   Contents