As far as I can tell (as of JDK 8 which I have handy), the best you can do within the Java JDK is
javax.print.attribute.standard.ReferenceUriSchemesSupported
which provides a number of URI-Schemes:
import javax.print.attribute.standard.ReferenceUriSchemesSupported;
// ...
System.out.println(ReferenceUriSchemesSupported.HTTPS); // => "https"
Of course, it also has GOPHER, NNTP, NEWS, and a few other out-of-date schemes, but it does provide what you want.
Other answers on the web suggest other frameworks, many of which do define the two protocols.
Otherwise, you just need something like this:
package demo;
public enum Scheme {
HTTP("http"),
HTTPS("https");
private final String scheme;
private Scheme(String scheme) {
this.scheme = scheme;
}
@Override
public String toString() {
return scheme;
}
}