From 1d463c0364a63415904fc6f59138f24bcdd2ffc3 Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Mon, 6 Jul 2020 11:40:13 -0400 Subject: [PATCH] add file scheme --- src/main/java/org/cobbzilla/util/http/HttpSchemes.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/cobbzilla/util/http/HttpSchemes.java b/src/main/java/org/cobbzilla/util/http/HttpSchemes.java index e453bc4..e938ec3 100644 --- a/src/main/java/org/cobbzilla/util/http/HttpSchemes.java +++ b/src/main/java/org/cobbzilla/util/http/HttpSchemes.java @@ -4,13 +4,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; public enum HttpSchemes { - http, https; + http, https, file; public static final String SCHEME_HTTP = http.schemeWithSeparator(); public static final String SCHEME_HTTPS = https.schemeWithSeparator(); public static final String PROTOCOL_SEP = "://"; - private String schemeWithSeparator() { return this.name()+PROTOCOL_SEP; } + public String schemeWithSeparator() { return this.name()+PROTOCOL_SEP; } public static boolean isHttpOrHttps(String val) { return val != null && (val.startsWith(SCHEME_HTTP) || val.startsWith(SCHEME_HTTPS));