Name

URLName

Synopsis

The URLName class stores the name of a URL, and provides helper methods to retrieve certain standardized information from the URL itself. This information includes host, password, port, protocol, and filename, although availability of particular information depends on the URL scheme in use. Unlike java.net.URL, URLName does not include any support for actually connecting to the identified resource.

public class URLName {
// Public Constructors
   public URLName( java.net.URL url);  
   public URLName( String url);  
   public URLName(String protocol, String host, int port, 
        String file, String username, String password);  
// Property Accessor Methods (by property name)
   public String getFile();  
   public String getHost();  
   public String getPassword();  
   public int getPort();  
   public String getProtocol();  
   public String getRef();  
   public java.net.URL getURL(
        ) throws java.net.MalformedURLException;  
   public String getUsername();  
// Public Methods Overriding Object
   public boolean equals( Object obj);  
   public int hashCode();  
   public String toString();  
// Protected Instance Methods
   protected void parseString( String url);  
// Protected Instance Fields
   protected String fullURL;  
}

Passed To

Service.{Service(), setURLName()}, javax.mail.Session.{getFolder(), getPasswordAuthentication(), getStore(), getTransport(), setPasswordAuthentication()}, Store.{getFolder(), Store()}, Transport.Transport()

Returned By

Folder.getURLName(), Service.getURLName()

Type Of

Service.url

Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.