/// <summary>Constructs a new File using the path of the specified URI.</summary> /// <remarks> /// Constructs a new File using the path of the specified URI. /// <code>uri</code> /// needs to be an absolute and hierarchical Unified Resource Identifier with /// file scheme and non-empty path component, but with undefined authority, /// query or fragment components. /// </remarks> /// <param name="uri"> /// the Unified Resource Identifier that is used to construct this /// file. /// </param> /// <exception cref="System.ArgumentException"> /// if /// <code>uri</code> /// does not comply with the conditions above. /// </exception> /// <seealso cref="toURI()">toURI()</seealso> /// <seealso cref="java.net.URI">java.net.URI</seealso> public File(java.net.URI uri) { // check pre-conditions checkURI(uri); this.path = fixSlashes(uri.getPath()); this.info = new FileInfo(this.path); }
/// <summary> /// Constructs a URIParameter with the URI pointing to /// data intended for an SPI implementation. /// </summary> /// <param name="uri"> the URI pointing to the data. /// </param> /// <exception cref="NullPointerException"> if the specified URI is null. </exception> public URIParameter(java.net.URI uri) { if (uri == null) { throw new NullPointerException("invalid null URI"); } this.Uri = uri; }
public TextExtractionResult Extract(Uri uri) { var jUri = new java.net.URI(uri.ToString()); return Extract(metadata => { var result = TikaInputStream.get(jUri, metadata); metadata.add("Uri", uri.ToString()); return result; }); }
public TextExtractionResult Extract(Uri uri) { var jUri = new java.net.URI(uri.ToString()); return(Extract(metadata => { var result = TikaInputStream.get(jUri, metadata); metadata.add("Uri", uri.ToString()); return result; })); }
public int compareTo(java.net.URI arg0) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { return(@__env.CallIntMethod(this.JvmHandle, global::java.net.URI._compareTo13855, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0))); } else { return(@__env.CallNonVirtualIntMethod(this.JvmHandle, global::java.net.URI.staticClass, global::java.net.URI._compareTo13855, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0))); } }
public global::java.net.URI relativize(java.net.URI arg0) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallObjectMethod(this.JvmHandle, global::java.net.URI._relativize13873, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0))) as java.net.URI); } else { return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallNonVirtualObjectMethod(this.JvmHandle, global::java.net.URI.staticClass, global::java.net.URI._relativize13873, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0))) as java.net.URI); } }
// // Constructor // public Uri(Uri baseUri, Uri relativeUri) { ThrowHelper.ThrowIfNull(baseUri); if (!baseUri.IsAbsoluteUri) { throw new ArgumentOutOfRangeException(); } try { JavaURI = baseUri.JavaURI.resolve(relativeUri.JavaURI); } catch (java.net.URISyntaxException e) { throw new UriFormatException(e.getMessage(), e); } }
// // Constructor // public Uri(string uriString, bool dontEscape, UriKind uriKind) { ThrowHelper.ThrowIfNull(uriString); if (uriString == "") { throw new UriFormatException("empty URI"); } if (!dontEscape) { if (uriKind != UriKind.Relative) { uriString = java.net.URLEncoder.encode(uriString, "UTF-8"); } } try { JavaURI = new java.net.URI(uriString); } catch (java.net.URISyntaxException e) { throw new UriFormatException(e.getMessage(), e); } if (uriKind == UriKind.Absolute) { if (!JavaURI.isAbsolute()) { throw new UriFormatException("relative URI for " + uriKind); } } else if (uriKind == UriKind.Relative) { if (JavaURI.isAbsolute()) { throw new UriFormatException("absolute URI for " + uriKind); } } else if (uriKind != UriKind.RelativeOrAbsolute) { throw new ArgumentException(); } }
private static void checkURI(java.net.URI uri) { if (!uri.isAbsolute()) { throw new System.ArgumentException("URI is not absolute: " + uri); } else { if (!uri.getRawSchemeSpecificPart().StartsWith("/")) { throw new System.ArgumentException("URI is not hierarchical: " + uri); } } if (!"file".Equals(uri.getScheme())) { throw new System.ArgumentException("Expected file scheme in URI: " + uri); } string rawPath = uri.getRawPath(); if (rawPath == null || string.IsNullOrEmpty(rawPath)) { throw new System.ArgumentException("Expected non-empty path in URI: " + uri); } if (uri.getRawAuthority() != null) { throw new System.ArgumentException("Found authority in URI: " + uri); } if (uri.getRawQuery() != null) { throw new System.ArgumentException("Found query in URI: " + uri); } if (uri.getRawFragment() != null) { throw new System.ArgumentException("Found fragment in URI: " + uri); } }
public abstract ResultDataContentWriter writer(java.net.URI baseUri);
public abstract HighAvailabilityMemberState slaveIsAvailable(HighAvailabilityMemberContext context, Org.Neo4j.cluster.InstanceId slaveId, java.net.URI slaveUri);
public abstract HighAvailabilityMemberState masterIsAvailable(HighAvailabilityMemberContext context, Org.Neo4j.cluster.InstanceId masterId, java.net.URI masterHaURI);
public File(java.net.URI arg0) : base(global::MonoJavaBridge.JNIEnv.ThreadEnv) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(java.io.File.staticClass, global::java.io.File._File12545, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); Init(@__env, handle); }