SlideServe
Menu
Préférences
© SlideServe · v2026

URL in Java

napua avatar
8 diapositives · 485 Views · Sep 02, 2014

URL in Java. C343 Lab (Week 13). A Java program can communicate with URLs (Uniform Resource Locator). These can also be used to create a URL object to represent a URL address. Using URL in Java.

URL in Java - slide 1
01 / 8URL in Java
1 / 17

Télécharger la présentation

URL in Java
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. URL in Java C343 Lab (Week 13)

  2. A Java program can communicate with URLs (Uniform Resource Locator). These can also be used to create a URL object to represent a URL address.

  3. Using URL in Java The java.net.URL class represents a URL and has complete set of methods to manipulate URL in Java. The URL class has several constructors for creating URLs, including the following:

  4. The URL class contains many methods for accessing the various parts of the URL being represented. Some of the methods in the URL class include the following:

  5. URLConnections Class Methods • The openConnection() method returns a java.net.URLConnection, an abstract class whose subclasses represent the various types of URL connections. • For example: If you connect to a URL whose protocol is HTTP, the openConnection() method returns an HttpURLConnection object. • If you connect to a URL that represents a JAR file, the openConnection() method returns a JarURLConnectionobject. • etc... • The URLConnection class has many methods for setting or determining information about the connection

  6. URLConnections Class Methods:

  7. Examples in URLDemo.java & URLConnDemo.java

  8. Resources • http://www.tutorialspoint.com/java/java_url_processing.htm