@Throws(MalformedURIException::class) fun URI(p_scheme: String?, p_schemeSpecificPart: String?) { if (p_scheme == null || p_scheme.trim { it <= ' ' }.length == 0) { throw MalformedURIException("Cannot construct URI with null/empty scheme!") } if (p_schemeSpecificPart == null || p_schemeSpecificPart.trim { it <= ' ' }.length == 0) { throw MalformedURIException("Cannot construct URI with null/empty scheme-specific part!") } setScheme(p_scheme) setPath(p_schemeSpecificPart) }
Construct a new URI that does not follow the generic URI syntax . Only the scheme and scheme-specific part ( stored as the path ) are initialized .