All Downloads are FREE. Search and download functionalities are using the official Maven repository.

system.net.HttpWebRequest Maven / Gradle / Ivy

/*
 *  MIT License
 *
 *  Copyright (c) 2022 MASES s.r.l.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 *  copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

/**************************************************************************************
 * 
 *      This code was generated from a template using JCOReflector
 * 
 *      Manual changes to this file may cause unexpected behavior in your application.
 *      Manual changes to this file will be overwritten if the code is regenerated.
 * 
 *************************************************************************************/

package system.net;

import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;

// Import section
import system.net.WebRequest;
import system.IAsyncResult;
import system.IAsyncResultImplementation;
import system.AsyncCallback;
import system.io.Stream;
import system.net.TransportContext;
import system.net.WebResponse;
import system.DateTime;
import system.net.cache.RequestCachePolicy;
import system.net.CookieContainer;
import system.net.DecompressionMethods;
import system.net.HttpContinueDelegate;
import system.net.ICredentials;
import system.net.ICredentialsImplementation;
import system.net.IWebProxy;
import system.net.IWebProxyImplementation;
import system.net.security.RemoteCertificateValidationCallback;
import system.net.ServicePoint;
import system.net.WebHeaderCollection;
import system.security.cryptography.x509certificates.X509CertificateCollection;
import system.Uri;
import system.Version;


/**
 * The base .NET class managing System.Net.HttpWebRequest, System.Net.Requests, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
 * 

* * See: https://docs.microsoft.com/en-us/dotnet/api/System.Net.HttpWebRequest */ public class HttpWebRequest extends WebRequest { /** * Fully assembly qualified name: System.Net.Requests, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a */ public static final String assemblyFullName = "System.Net.Requests, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; /** * Assembly name: System.Net.Requests */ public static final String assemblyShortName = "System.Net.Requests"; /** * Qualified class name: System.Net.HttpWebRequest */ public static final String className = "System.Net.HttpWebRequest"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { String classToCreate = className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); if (JCOReflector.getDebug()) JCOReflector.writeLog("Creating %s", classToCreate); JCType typeCreated = bridge.GetType(classToCreate); if (JCOReflector.getDebug()) JCOReflector.writeLog("Created: %s", (typeCreated != null) ? typeCreated.toString() : "Returned null value"); return typeCreated; } catch (JCException e) { JCOReflector.writeLog(e); return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } /** * Internal constructor. Use with caution */ public HttpWebRequest(java.lang.Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public java.lang.Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link HttpWebRequest}, a cast assert is made to check if types are compatible. * @param from {@link IJCOBridgeReflected} instance to be casted * @return {@link HttpWebRequest} instance * @throws java.lang.Throwable in case of error during cast operation */ public static HttpWebRequest cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new HttpWebRequest(from.getJCOInstance()); } // Constructors section public HttpWebRequest() throws Throwable { } // Methods section public IAsyncResult BeginGetRequestStream(AsyncCallback callback, NetObject state) throws Throwable, system.ArgumentException, system.PlatformNotSupportedException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.net.WebException, system.globalization.CultureNotFoundException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.net.ProtocolViolationException, system.FormatException, system.diagnostics.tracing.EventSourceException, system.threading.tasks.TaskSchedulerException, system.ObjectDisposedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objBeginGetRequestStream = (JCObject)classInstance.Invoke("BeginGetRequestStream", callback, state == null ? null : state.getJCOInstance()); return new IAsyncResultImplementation(objBeginGetRequestStream); } catch (JCNativeException jcne) { throw translateException(jcne); } } public IAsyncResult BeginGetResponse(AsyncCallback callback, NetObject state) throws Throwable, system.ArgumentException, system.PlatformNotSupportedException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.net.WebException, system.OutOfMemoryException, system.FormatException, system.IndexOutOfRangeException, system.diagnostics.tracing.EventSourceException, system.threading.tasks.TaskSchedulerException, system.ObjectDisposedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objBeginGetResponse = (JCObject)classInstance.Invoke("BeginGetResponse", callback, state == null ? null : state.getJCOInstance()); return new IAsyncResultImplementation(objBeginGetResponse); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Stream EndGetRequestStream(IAsyncResult asyncResult, JCORefOut context) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objEndGetRequestStream = (JCObject)classInstance.Invoke("EndGetRequestStream", asyncResult == null ? null : asyncResult.getJCOInstance(), context.getJCRefOut()); return new Stream(objEndGetRequestStream); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Stream EndGetRequestStream(IAsyncResult asyncResult) throws Throwable, system.ArgumentException, system.PlatformNotSupportedException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.net.WebException, system.FormatException, system.diagnostics.tracing.EventSourceException, system.OutOfMemoryException, system.threading.tasks.TaskSchedulerException, system.ObjectDisposedException, system.OperationCanceledException, system.threading.tasks.TaskCanceledException, system.AggregateException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objEndGetRequestStream = (JCObject)classInstance.Invoke("EndGetRequestStream", asyncResult == null ? null : asyncResult.getJCOInstance()); return new Stream(objEndGetRequestStream); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Stream GetRequestStream() throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.PlatformNotSupportedException, system.net.WebException, system.globalization.CultureNotFoundException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.ArgumentOutOfRangeException, system.net.ProtocolViolationException, system.InvalidOperationException, system.threading.tasks.TaskSchedulerException, system.ObjectDisposedException, system.OperationCanceledException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetRequestStream = (JCObject)classInstance.Invoke("GetRequestStream"); return new Stream(objGetRequestStream); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Stream GetRequestStream(JCORefOut context) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetRequestStream = (JCObject)classInstance.Invoke("GetRequestStream", context.getJCRefOut()); return new Stream(objGetRequestStream); } catch (JCNativeException jcne) { throw translateException(jcne); } } public WebResponse EndGetResponse(IAsyncResult asyncResult) throws Throwable, system.ArgumentException, system.PlatformNotSupportedException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.net.WebException, system.FormatException, system.diagnostics.tracing.EventSourceException, system.OutOfMemoryException, system.threading.tasks.TaskSchedulerException, system.ObjectDisposedException, system.OperationCanceledException, system.threading.tasks.TaskCanceledException, system.AggregateException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objEndGetResponse = (JCObject)classInstance.Invoke("EndGetResponse", asyncResult == null ? null : asyncResult.getJCOInstance()); return new WebResponse(objEndGetResponse); } catch (JCNativeException jcne) { throw translateException(jcne); } } public WebResponse GetResponse() throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.PlatformNotSupportedException, system.diagnostics.tracing.EventSourceException, system.OutOfMemoryException, system.InvalidOperationException, system.threading.tasks.TaskSchedulerException, system.ArgumentOutOfRangeException, system.ObjectDisposedException, system.OperationCanceledException, system.threading.tasks.TaskCanceledException, system.AggregateException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetResponse = (JCObject)classInstance.Invoke("GetResponse"); return new WebResponse(objGetResponse); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void Abort() throws Throwable, system.PlatformNotSupportedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.ObjectDisposedException, system.AggregateException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("Abort"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void AddRange(int from, int to) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.FormatException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("AddRange", from, to); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void AddRange(int range) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.FormatException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("AddRange", range); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void AddRange(long from, long to) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.FormatException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("AddRange", from, to); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void AddRange(long range) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.FormatException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("AddRange", range); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void AddRange(java.lang.String rangeSpecifier, int from, int to) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.FormatException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("AddRange", rangeSpecifier, from, to); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void AddRange(java.lang.String rangeSpecifier, int range) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.FormatException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("AddRange", rangeSpecifier, range); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void AddRange(java.lang.String rangeSpecifier, long from, long to) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.FormatException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("AddRange", rangeSpecifier, from, to); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void AddRange(java.lang.String rangeSpecifier, long range) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.FormatException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("AddRange", rangeSpecifier, range); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Properties section public boolean getAllowAutoRedirect() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("AllowAutoRedirect"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setAllowAutoRedirect(boolean AllowAutoRedirect) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("AllowAutoRedirect", AllowAutoRedirect); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getAllowReadStreamBuffering() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("AllowReadStreamBuffering"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setAllowReadStreamBuffering(boolean AllowReadStreamBuffering) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("AllowReadStreamBuffering", AllowReadStreamBuffering); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getAllowWriteStreamBuffering() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("AllowWriteStreamBuffering"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setAllowWriteStreamBuffering(boolean AllowWriteStreamBuffering) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("AllowWriteStreamBuffering", AllowWriteStreamBuffering); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getHaveResponse() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("HaveResponse"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getKeepAlive() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("KeepAlive"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setKeepAlive(boolean KeepAlive) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("KeepAlive", KeepAlive); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getPipelined() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("Pipelined"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setPipelined(boolean Pipelined) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Pipelined", Pipelined); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getSendChunked() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("SendChunked"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setSendChunked(boolean SendChunked) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("SendChunked", SendChunked); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getSupportsCookieContainer() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("SupportsCookieContainer"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getUnsafeAuthenticatedConnectionSharing() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("UnsafeAuthenticatedConnectionSharing"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setUnsafeAuthenticatedConnectionSharing(boolean UnsafeAuthenticatedConnectionSharing) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("UnsafeAuthenticatedConnectionSharing", UnsafeAuthenticatedConnectionSharing); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int getContinueTimeout() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Get("ContinueTimeout"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setContinueTimeout(int ContinueTimeout) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("ContinueTimeout", ContinueTimeout); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static int getDefaultMaximumErrorResponseLength() throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (int)classType.Get("DefaultMaximumErrorResponseLength"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void setDefaultMaximumErrorResponseLength(int DefaultMaximumErrorResponseLength) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Set("DefaultMaximumErrorResponseLength", DefaultMaximumErrorResponseLength); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static int getDefaultMaximumResponseHeadersLength() throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (int)classType.Get("DefaultMaximumResponseHeadersLength"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void setDefaultMaximumResponseHeadersLength(int DefaultMaximumResponseHeadersLength) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Set("DefaultMaximumResponseHeadersLength", DefaultMaximumResponseHeadersLength); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int getMaximumAutomaticRedirections() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Get("MaximumAutomaticRedirections"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setMaximumAutomaticRedirections(int MaximumAutomaticRedirections) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("MaximumAutomaticRedirections", MaximumAutomaticRedirections); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int getMaximumResponseHeadersLength() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Get("MaximumResponseHeadersLength"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setMaximumResponseHeadersLength(int MaximumResponseHeadersLength) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("MaximumResponseHeadersLength", MaximumResponseHeadersLength); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int getReadWriteTimeout() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Get("ReadWriteTimeout"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setReadWriteTimeout(int ReadWriteTimeout) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("ReadWriteTimeout", ReadWriteTimeout); } catch (JCNativeException jcne) { throw translateException(jcne); } } public DateTime getDate() throws Throwable, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArgumentException, system.OutOfMemoryException, system.IndexOutOfRangeException, system.OverflowException, system.FormatException, system.globalization.CultureNotFoundException, system.net.ProtocolViolationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Date"); return new DateTime(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setDate(DateTime Date) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.RankException, system.IndexOutOfRangeException, system.ArrayTypeMismatchException, system.InvalidTimeZoneException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.OverflowException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Date", Date == null ? null : Date.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public DateTime getIfModifiedSince() throws Throwable, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArgumentException, system.OutOfMemoryException, system.IndexOutOfRangeException, system.OverflowException, system.FormatException, system.globalization.CultureNotFoundException, system.net.ProtocolViolationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("IfModifiedSince"); return new DateTime(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setIfModifiedSince(DateTime IfModifiedSince) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.RankException, system.IndexOutOfRangeException, system.ArrayTypeMismatchException, system.InvalidTimeZoneException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.OverflowException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("IfModifiedSince", IfModifiedSince == null ? null : IfModifiedSince.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static RequestCachePolicy getDefaultCachePolicy() throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject val = (JCObject)classType.Get("DefaultCachePolicy"); return new RequestCachePolicy(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void setDefaultCachePolicy(RequestCachePolicy DefaultCachePolicy) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Set("DefaultCachePolicy", DefaultCachePolicy == null ? null : DefaultCachePolicy.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public CookieContainer getCookieContainer() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("CookieContainer"); return new CookieContainer(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setCookieContainer(CookieContainer CookieContainer) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("CookieContainer", CookieContainer == null ? null : CookieContainer.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public DecompressionMethods getAutomaticDecompression() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("AutomaticDecompression"); return new DecompressionMethods(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setAutomaticDecompression(DecompressionMethods AutomaticDecompression) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("AutomaticDecompression", AutomaticDecompression == null ? null : AutomaticDecompression.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public HttpContinueDelegate getContinueDelegate() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (HttpContinueDelegate)classInstance.Get("ContinueDelegate"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setContinueDelegate(HttpContinueDelegate ContinueDelegate) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("ContinueDelegate", ContinueDelegate); } catch (JCNativeException jcne) { throw translateException(jcne); } } public RemoteCertificateValidationCallback getServerCertificateValidationCallback() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (RemoteCertificateValidationCallback)classInstance.Get("ServerCertificateValidationCallback"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setServerCertificateValidationCallback(RemoteCertificateValidationCallback ServerCertificateValidationCallback) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("ServerCertificateValidationCallback", ServerCertificateValidationCallback); } catch (JCNativeException jcne) { throw translateException(jcne); } } public ServicePoint getServicePoint() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.UriFormatException, system.NotSupportedException, system.OutOfMemoryException, system.InvalidTimeZoneException, system.OverflowException, system.security.SecurityException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("ServicePoint"); return new ServicePoint(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public X509CertificateCollection getClientCertificates() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("ClientCertificates"); return new X509CertificateCollection(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setClientCertificates(X509CertificateCollection ClientCertificates) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("ClientCertificates", ClientCertificates == null ? null : ClientCertificates.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getAccept() throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("Accept"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setAccept(java.lang.String Accept) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.RankException, system.IndexOutOfRangeException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Accept", Accept); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getConnection() throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("Connection"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setConnection(java.lang.String Connection) throws Throwable, system.ArgumentException, system.PlatformNotSupportedException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.globalization.CultureNotFoundException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Connection", Connection); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getExpect() throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("Expect"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setExpect(java.lang.String Expect) throws Throwable, system.ArgumentException, system.PlatformNotSupportedException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.globalization.CultureNotFoundException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Expect", Expect); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getHost() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.UriFormatException, system.OutOfMemoryException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("Host"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setHost(java.lang.String Host) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.UriFormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Host", Host); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getMediaType() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("MediaType"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setMediaType(java.lang.String MediaType) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("MediaType", MediaType); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getReferer() throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("Referer"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setReferer(java.lang.String Referer) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.RankException, system.IndexOutOfRangeException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Referer", Referer); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getTransferEncoding() throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("TransferEncoding"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setTransferEncoding(java.lang.String TransferEncoding) throws Throwable, system.ArgumentException, system.PlatformNotSupportedException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.globalization.CultureNotFoundException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("TransferEncoding", TransferEncoding); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getUserAgent() throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("UserAgent"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setUserAgent(java.lang.String UserAgent) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.RankException, system.IndexOutOfRangeException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("UserAgent", UserAgent); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Uri getAddress() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Address"); return new Uri(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Version getProtocolVersion() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("ProtocolVersion"); return new Version(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setProtocolVersion(Version ProtocolVersion) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("ProtocolVersion", ProtocolVersion == null ? null : ProtocolVersion.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Instance Events section }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy