MCPcopy Create free account
hub / github.com/M66B/FairEmail / URLName

Method URLName

app/src/main/java/javax/mail/URLName.java:122–144  ·  view source on GitHub ↗

Creates a URLName object from the specified protocol, host, port number, file, username, and password. Specifying a port number of -1 indicates that the URL should use the default port for the protocol. @param protocol the protocol @param host the host name @param port the port number @param file

(
	String protocol,
	String host,
	int port,
	String file,
	String username,
	String password
	)

Source from the content-addressed store, hash-verified

120 * @param password the password
121 */
122 public URLName(
123 String protocol,
124 String host,
125 int port,
126 String file,
127 String username,
128 String password
129 )
130 {
131 this.protocol = protocol;
132 this.host = host;
133 this.port = port;
134 int refStart;
135 if (file != null && (refStart = file.indexOf('#')) != -1) {
136 this.file = file.substring(0, refStart);
137 this.ref = file.substring(refStart + 1);
138 } else {
139 this.file = file;
140 this.ref = null;
141 }
142 this.username = doEncode ? encode(username) : username;
143 this.password = doEncode ? encode(password) : password;
144 }
145
146 /**
147 * Construct a URLName from a java.net.URL object.

Callers

nothing calls this directly

Calls 4

encodeMethod · 0.95
parseStringMethod · 0.95
indexOfMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected