18#ifndef _DECAF_NET_URL_H_
19#define _DECAF_NET_URL_H_
An immutable sequence of characters.
Definition String.h:57
This class represents an instance of a URI as defined by RFC 2396.
Definition URI.h:37
Concrete implementations of the abstract URLConnection class provide a communication link to a URL fo...
Definition URLConnection.h:41
decaf::lang::String getProtocol() const
Gets the protocol of this URL.
decaf::lang::String getUserInfo() const
Gets the user Info part of this URL.
URLConnection * openConnection(const Proxy *proxy)
Same basic functionality as openConnection() is provided here, except that the connection will be mad...
decaf::lang::String getPath() const
Gets the path part of this URL.
int getDefaultPort() const
Gets the default port number of the protocol associated with this URL.
URI toURI() const
Returns a URI instance that is the equivalent of this URL.
int hashCode() const
Creates an integer hash code for this URL which is used in hash based collections.
decaf::lang::String getQuery() const
Gets the query part of this URL.
URL(const decaf::lang::String &protocol, const decaf::lang::String &host, int port, const decaf::lang::String &file, URLStreamHandler *handler)
Creates a URL object from the specified protocol, host, port number, file, and handler.
decaf::lang::String getFile() const
Gets the file name of this URL.
decaf::lang::String getRef() const
Gets the anchor or "reference" portion of this URL.
bool equals(const URL &other) const
Compares this URL for equality with another URL.
decaf::lang::String toExternalForm() const
Constructs a string representation of this URL, by calling the toExternalForm method of the stream pr...
decaf::io::InputStream * openStream()
Shortcut method to opens a connection to this URL and fetch an InputStream for reading from that conn...
int getPort() const
Gets the port of this URL.
static void setURLStreamHandlerFactory(URLStreamHandlerFactory *factory)
Sets an application's URLStreamHandlerFactory.
URL(const decaf::lang::String &protocol, const decaf::lang::String &host, int port, const decaf::lang::String &file)
Creates a new URL instance using the given arguments.
URL(const decaf::lang::String &protocol, const decaf::lang::String &host, const decaf::lang::String &file)
Creates a URL from the specified protocol name, host name, and file name.
URL(const URL &context, const decaf::lang::String &spec, URLStreamHandler *handler)
Creates a URL by parsing the given spec with the specified handler within a specified context.
bool sameFile(const URL &other) const
Compares this URL to the other ignoring the fragment portion to determine if both reference the same ...
URL(const URL &context, const decaf::lang::String &spec)
Creates a URL by parsing the given spec within a specified context.
decaf::lang::String getHost() const
Gets the host name of this URL, if applicable.
friend class URLStreamHandler
Definition URL.h:523
URL(const decaf::lang::String &url)
Creates a URL object from the String representation.
std::string toString() const
Calls toExternalForm to create a string representation of this URL.
URLConnection * openConnection()
Returns a URLConnection object that represents a connection to the remote object referred to by the U...
decaf::lang::String getAuthority() const
Gets the authority part of this URL.
Defines a factory which creates an URLStreamHandler for a specified protocol.
Definition URLStreamHandlerFactory.h:36
The abstract class URLStreamHandler is the common superclass for all stream protocol handlers.
Definition URLStreamHandler.h:45
#define DECAF_API
Definition Config.h:29
Definition URLStreamHandlerManager.h:26
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25