2007-07-29 01:29:01 +00:00
|
|
|
package java.net;
|
|
|
|
|
2007-08-01 23:48:36 +00:00
|
|
|
public final class URL {
|
|
|
|
// private final String protocol;
|
|
|
|
// private final String host;
|
|
|
|
// private final int port;
|
|
|
|
// private final String file;
|
2007-07-29 01:29:01 +00:00
|
|
|
|
2007-07-29 23:32:23 +00:00
|
|
|
public URL(String s) throws MalformedURLException {
|
2007-08-01 23:48:36 +00:00
|
|
|
// int colon = s.indexOf(':');
|
|
|
|
// int slash = s.indexOf('/');
|
|
|
|
// if (colon > 0 && (slash < 0 || colon < slash)) {
|
|
|
|
// protocol = s.substring(0, colon);
|
|
|
|
// // todo
|
|
|
|
// } else {
|
|
|
|
// throw new MalformedURLException(s);
|
|
|
|
// }
|
2007-07-29 23:32:23 +00:00
|
|
|
}
|
2007-07-29 01:29:01 +00:00
|
|
|
}
|