Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 48 49 package org.jpublish.util.uri; 50 51 57 58 public class InternalURI { 59 60 public static final String PROTOCOL_SEPARATOR = ":"; 61 public static final String URI_SEPARATOR = "://"; 62 63 protected String protocol; 64 protected String path; 65 66 71 72 public String getProtocol() { 73 return protocol; 74 } 75 76 81 82 public void setProtocol(String protocol) { 83 this.protocol = protocol; 84 } 85 86 91 92 public String getPath() { 93 return path; 94 } 95 96 101 102 public void setPath(String path) { 103 this.path = path; 104 } 105 106 112 113 public String toURI() { 114 StringBuffer buffer = new StringBuffer (); 115 buffer.append(protocol); 116 buffer.append(URI_SEPARATOR); 117 buffer.append(path); 118 return buffer.toString(); 119 } 120 121 127 128 public void setURI(String uriString) { 129 int protocolTerminatorIndex = uriString.indexOf(PROTOCOL_SEPARATOR); 130 131 protocol = uriString.substring(0, protocolTerminatorIndex); 132 path = uriString.substring(protocolTerminatorIndex + 133 URI_SEPARATOR.length()); 134 } 135 136 } 137
| Popular Tags
|