public static FileLocation fromLocation(String location) {
		// default as file
		if (!location.contains(COLON)) {
			return new FileLocation(location, ProtocolNames.FILE);
		}

		final int i = location.indexOf(COLON);
		final String protocol = location.substring(0, i);
		final String file = location.substring(i + 1);

		return new FileLocation(file, protocol.toLowerCase());
	}
@author <a href="mailto:wangyuxuan@dangdang.com">Yuxuan Wang</a>
config-toolkit/src/main/java/com/dangdang/config/service/file/FileLocation.java