public enum EURLProtocol extends Enum<EURLProtocol> implements IURLProtocol
| Enum Constant and Description |
|---|
BUNDLE
OSGI bundle
|
CALLTO
Skype.
|
CID
Content ID (RFC 2392)
|
DATA
Embedded data (RFC 2397).
|
FILE
Local file (RFC 1738).
|
FTP
ftp (RFC 1738).
|
FTPS
ftps.
|
GEO
geographic coordinates (RFC 5870).
|
GOPHER
Gopher (RFC 4266).
|
HTTP
http (RFC 2616).
|
HTTPS
https (RFC 2818).
|
JAR
regular JAR
|
JAVASCRIPT
JavaScript
|
LDAP
LDAP (RFC 4516).
|
MAILTO
Email (RFC 6068).
|
MID
Message ID (RFC 2392)
|
MMS
MS Media Server.
|
NEWS
News (RFC 5538).
|
NNTP
NNTP (RFC 5538).
|
POP
POP3 (RFC 2384).
|
RSYNC
RSync.
|
RTMP
RTMP
|
RTSP
Real time streaming protocol (RFC 2326).
|
RTSPU
Real time streaming protocol (unreliable) (RFC 2326).
|
SCP
scp.
|
SFTP
sftp.
|
SHTTP
shttp (RFC 2660).
|
SIP
session initiation protocol (RFC 3261).
|
SIPS
secure session initiation protocol (RFC 3261).
|
TEL
Telephone (RFC 3966).
|
TELNET
Reference to interactive sessions (RFC 4248).
|
URN
URN (RFC 2141)
|
WS
Web socket (RFC 6455).
|
WSJAR
WebSphere JAR
|
WSS
Encrypted web socket (RFC 6455).
|
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 final EURLProtocol CID
public static final EURLProtocol MID
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–2019 Philip Helger. All rights reserved.