public enum EURLProtocol extends Enum<EURLProtocol> implements IURLProtocol
| Enum Constant and Description |
|---|
BUNDLE
OSGI bundle
|
CALLTO
Skype.
|
DATA
Embedded data (RFC2397).
|
FILE
Local file (RFC1738).
|
FTP
ftp (RFC1738).
|
FTPS
ftps.
|
GEO
geographic coordinates (RFC5870).
|
GOPHER
Gopher (RFC4266).
|
HTTP
http (RFC2616).
|
HTTPS
https (RFC2818).
|
JAR
regular JAR
|
JAVASCRIPT
JavaScript
|
LDAP
LDAP (RFC4516).
|
MAILTO
Email (RFC6068).
|
MMS
MS Media Server.
|
NEWS
News (RFC5538).
|
NNTP
NNTP (RFC5538).
|
POP
POP3 (RFC2384).
|
RSYNC
RSync.
|
RTMP
RTMP
|
RTSP
Real time streaming protocol (RFC2326).
|
RTSPU
Real time streaming protocol (unreliable) (RFC2326).
|
SCP
scp.
|
SFTP
sftp.
|
SHTTP
shttp (RFC2660).
|
SIP
session initiation protocol (RFC3261).
|
SIPS
secure session initiation protocol (RFC3261).
|
TEL
Telephone (RFC3966).
|
TELNET
Reference to interactive sessions (RFC4248).
|
URN
URN (RFC2141)
|
WS
Web socket (RFC6455).
|
WSJAR
WebSphere JAR
|
WSS
Encrypted web socket (RFC6455).
|
ZIP
ZIP file
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsForQueryParameters() |
String |
getProtocol() |
String |
getWithProtocol(String sURL)
Prefix the passed URL with this protocol.
|
String |
getWithProtocolIfNone(String sURL)
Prefix the passed URL with this protocol if the URL does not have a
protocol yet.
|
boolean |
isUsedInURL(String sURL)
Tells if the passed String (URL) belongs to this protocol.
|
static EURLProtocol |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EURLProtocol[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EURLProtocol HTTP
public static final EURLProtocol HTTPS
public static final EURLProtocol FILE
public static final EURLProtocol FTP
public static final EURLProtocol BUNDLE
public static final EURLProtocol CALLTO
public static final EURLProtocol DATA
public static final EURLProtocol FTPS
public static final EURLProtocol GEO
public static final EURLProtocol GOPHER
public static final EURLProtocol JAR
public static final EURLProtocol JAVASCRIPT
public static final EURLProtocol LDAP
public static final EURLProtocol MAILTO
public static final EURLProtocol MMS
public static final EURLProtocol NEWS
public static final EURLProtocol NNTP
public static final EURLProtocol POP
public static final EURLProtocol RSYNC
public static final EURLProtocol RTMP
public static final EURLProtocol RTSP
public static final EURLProtocol RTSPU
public static final EURLProtocol SCP
public static final EURLProtocol SFTP
public static final EURLProtocol SHTTP
public static final EURLProtocol SIP
public static final EURLProtocol SIPS
public static final EURLProtocol TEL
public static final EURLProtocol TELNET
public static final EURLProtocol URN
public static final EURLProtocol WS
public static final EURLProtocol WSJAR
public static final EURLProtocol WSS
public static final EURLProtocol ZIP
public static EURLProtocol[] values()
for (EURLProtocol c : EURLProtocol.values()) System.out.println(c);
public static EURLProtocol valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null@Nonnull @Nonempty public String getProtocol()
getProtocol in interface IURLProtocolpublic boolean isUsedInURL(@Nullable String sURL)
isUsedInURL in interface IURLProtocolsURL - The URL to check. May be null.true if the passed URL starts with this protocol@Nullable public String getWithProtocol(@Nullable String sURL)
IURLProtocolgetWithProtocol in interface IURLProtocolsURL - The URL to be prefixed. May be null.null if the parameter is null. The
protocol is prepended independent whether the URL already has a
protocol or not.@Nullable public String getWithProtocolIfNone(@Nullable String sURL)
IURLProtocolgetWithProtocolIfNone in interface IURLProtocolsURL - The URL to be prefixed. May be null.null if the parameter is null. The
protocol is prepended if the URL not already has a protocol.public boolean allowsForQueryParameters()
allowsForQueryParameters in interface IURLProtocoltrue if this protocol can handle HTTP query parameters
(?x=y&z=1)Copyright © 2014–2015 Philip Helger. All rights reserved.