java.net
Class URL
java.lang.Object
java.net.URL
- All Implemented Interfaces:
- Serializable
- public final class URL
- extends Object
- implements Serializable
|
Constructor Summary |
URL(String)
|
URL(String,
String,
int,
String)
|
URL(String,
String,
int,
String,
URLStreamHandler)
|
URL(String,
String,
String)
|
URL(URL,
String)
|
URL(URL,
String,
URLStreamHandler)
|
|
Method Summary |
private void |
checkSpecifyHandler(SecurityManager)
|
boolean |
equals(Object)
|
String |
getAuthority()
|
Object |
getContent()
|
Object |
getContent(Class[])
|
int |
getDefaultPort()
|
String |
getFile()
|
String |
getHost()
|
String |
getPath()
|
int |
getPort()
|
String |
getProtocol()
|
String |
getQuery()
|
String |
getRef()
|
(package private) static URLStreamHandler |
getURLStreamHandler(String)
|
String |
getUserInfo()
|
int |
hashCode()
|
private boolean |
isValidProtocol(String)
|
URLConnection |
openConnection()
|
URLConnection |
openConnection(Proxy)
|
InputStream |
openStream()
|
private void |
readObject(ObjectInputStream)
|
boolean |
sameFile(URL)
|
protected void |
set(String,
String,
int,
String,
String)
|
protected void |
set(String,
String,
int,
String,
String,
String,
String,
String)
|
static void |
setURLStreamHandlerFactory(URLStreamHandlerFactory)
|
String |
toExternalForm()
|
String |
toString()
|
URI |
toURI()
|
private void |
writeObject(ObjectOutputStream)
|
ref
private String ref
handler
transient URLStreamHandler handler
handlers
static Hashtable handlers
factory
static URLStreamHandlerFactory factory
protocolPathProp
private static final String protocolPathProp
serialVersionUID
static final long serialVersionUID
streamHandlerLock
private static Object streamHandlerLock
path
private transient String path
authority
private String authority
hostAddress
transient InetAddress hostAddress
query
private transient String query
host
private String host
hashCode
private int hashCode
userInfo
private transient String userInfo
protocol
private String protocol
port
private int port
file
private String file
URL
public URL(String,
String,
int,
String)
throws MalformedURLException
- Throws:
MalformedURLException
URL
public URL(String,
String,
String)
throws MalformedURLException
- Throws:
MalformedURLException
URL
public URL(String,
String,
int,
String,
URLStreamHandler)
throws MalformedURLException
- Throws:
MalformedURLException
URL
public URL(String)
throws MalformedURLException
- Throws:
MalformedURLException
URL
public URL(URL,
String)
throws MalformedURLException
- Throws:
MalformedURLException
URL
public URL(URL,
String,
URLStreamHandler)
throws MalformedURLException
- Throws:
MalformedURLException
isValidProtocol
private boolean isValidProtocol(String)
checkSpecifyHandler
private void checkSpecifyHandler(SecurityManager)
set
protected void set(String,
String,
int,
String,
String)
set
protected void set(String,
String,
int,
String,
String,
String,
String,
String)
getQuery
public String getQuery()
getPath
public String getPath()
getUserInfo
public String getUserInfo()
getAuthority
public String getAuthority()
getPort
public int getPort()
getDefaultPort
public int getDefaultPort()
getProtocol
public String getProtocol()
getHost
public String getHost()
getFile
public String getFile()
getRef
public String getRef()
equals
public boolean equals(Object)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
sameFile
public boolean sameFile(URL)
toString
public String toString()
- Overrides:
toString in class Object
toExternalForm
public String toExternalForm()
toURI
public URI toURI()
throws URISyntaxException
- Throws:
URISyntaxException
openConnection
public URLConnection openConnection()
throws IOException
- Throws:
IOException
openConnection
public URLConnection openConnection(Proxy)
throws IOException
- Throws:
IOException
openStream
public final InputStream openStream()
throws IOException
- Throws:
IOException
getContent
public final Object getContent()
throws IOException
- Throws:
IOException
getContent
public final Object getContent(Class[])
throws IOException
- Throws:
IOException
setURLStreamHandlerFactory
public static void setURLStreamHandlerFactory(URLStreamHandlerFactory)
getURLStreamHandler
static URLStreamHandler getURLStreamHandler(String)
writeObject
private void writeObject(ObjectOutputStream)
throws IOException
- Throws:
IOException
readObject
private void readObject(ObjectInputStream)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.