소스 검색

add file scheme

tags/2.0.1
Jonathan Cobb 4 년 전
부모
커밋
1d463c0364
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      src/main/java/org/cobbzilla/util/http/HttpSchemes.java

+ 2
- 2
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));


불러오는 중...
취소
저장