| // Autogenerated by jnigen. DO NOT EDIT! | |
| // ignore_for_file: annotate_overrides | |
| // ignore_for_file: camel_case_extensions | |
| // ignore_for_file: camel_case_types | |
| // ignore_for_file: constant_identifier_names | |
| // ignore_for_file: file_names | |
| // ignore_for_file: no_leading_underscores_for_local_identifiers | |
| // ignore_for_file: non_constant_identifier_names | |
| // ignore_for_file: overridden_fields | |
| // ignore_for_file: unnecessary_cast | |
| // ignore_for_file: unused_element | |
| // ignore_for_file: unused_field | |
| // ignore_for_file: unused_import | |
| // ignore_for_file: unused_shown_name | |
| import "dart:isolate" show ReceivePort; | |
| import "dart:ffi" as ffi; | |
| import "package:jni/internal_helpers_for_jnigen.dart"; | |
| import "package:jni/jni.dart" as jni; | |
| import "URLConnection.dart" as urlconnection_; | |
| import "URL.dart" as url_; | |
| import "../io/InputStream.dart" as inputstream_; | |
| /// from: java.net.HttpURLConnection | |
| class HttpURLConnection extends urlconnection_.URLConnection { | |
| @override | |
| late final jni.JObjType<HttpURLConnection> $type = type; | |
| HttpURLConnection.fromRef( | |
| jni.JObjectPtr ref, | |
| ) : super.fromRef(ref); | |
| static final _class = jni.Jni.findJClass(r"java/net/HttpURLConnection"); | |
| /// The type which includes information such as the signature of this class. | |
| static const type = $HttpURLConnectionType(); | |
| static final _id_method = jni.Jni.accessors.getFieldIDOf( | |
| _class.reference, | |
| r"method", | |
| r"Ljava/lang/String;", | |
| ); | |
| /// from: protected java.lang.String method | |
| /// The returned object must be deleted after use, by calling the `delete` method. | |
| jni.JString get method => const jni.JStringType().fromRef(jni.Jni.accessors | |
| .getField(reference, _id_method, jni.JniCallType.objectType) | |
| .object); | |
| /// from: protected java.lang.String method | |
| /// The returned object must be deleted after use, by calling the `delete` method. | |
| set method(jni.JString value) => | |
| jni.Jni.env.SetObjectField(reference, _id_method, value.reference); | |
| static final _id_chunkLength = jni.Jni.accessors.getFieldIDOf( | |
| _class.reference, | |
| r"chunkLength", | |
| r"I", | |
| ); | |
| /// from: protected int chunkLength | |
| int get chunkLength => jni.Jni.accessors | |
| .getField(reference, _id_chunkLength, jni.JniCallType.intType) | |
| .integer; | |
| /// from: protected int chunkLength | |
| set chunkLength(int value) => | |
| jni.Jni.env.SetIntField(reference, _id_chunkLength, value); | |
| static final _id_fixedContentLength = jni.Jni.accessors.getFieldIDOf( | |
| _class.reference, | |
| r"fixedContentLength", | |
| r"I", | |
| ); | |
| /// from: protected int fixedContentLength | |
| int get fixedContentLength => jni.Jni.accessors | |
| .getField(reference, _id_fixedContentLength, jni.JniCallType.intType) | |
| .integer; | |
| /// from: protected int fixedContentLength | |
| set fixedContentLength(int value) => | |
| jni.Jni.env.SetIntField(reference, _id_fixedContentLength, value); | |
| static final _id_fixedContentLengthLong = jni.Jni.accessors.getFieldIDOf( | |
| _class.reference, | |
| r"fixedContentLengthLong", | |
| r"J", | |
| ); | |
| /// from: protected long fixedContentLengthLong | |
| int get fixedContentLengthLong => jni.Jni.accessors | |
| .getField(reference, _id_fixedContentLengthLong, jni.JniCallType.longType) | |
| .long; | |
| /// from: protected long fixedContentLengthLong | |
| set fixedContentLengthLong(int value) => | |
| jni.Jni.env.SetLongField(reference, _id_fixedContentLengthLong, value); | |
| static final _id_responseCode = jni.Jni.accessors.getFieldIDOf( | |
| _class.reference, | |
| r"responseCode", | |
| r"I", | |
| ); | |
| /// from: protected int responseCode | |
| int get responseCode => jni.Jni.accessors | |
| .getField(reference, _id_responseCode, jni.JniCallType.intType) | |
| .integer; | |
| /// from: protected int responseCode | |
| set responseCode(int value) => | |
| jni.Jni.env.SetIntField(reference, _id_responseCode, value); | |
| static final _id_responseMessage = jni.Jni.accessors.getFieldIDOf( | |
| _class.reference, | |
| r"responseMessage", | |
| r"Ljava/lang/String;", | |
| ); | |
| /// from: protected java.lang.String responseMessage | |
| /// The returned object must be deleted after use, by calling the `delete` method. | |
| jni.JString get responseMessage => | |
| const jni.JStringType().fromRef(jni.Jni.accessors | |
| .getField(reference, _id_responseMessage, jni.JniCallType.objectType) | |
| .object); | |
| /// from: protected java.lang.String responseMessage | |
| /// The returned object must be deleted after use, by calling the `delete` method. | |
| set responseMessage(jni.JString value) => jni.Jni.env | |
| .SetObjectField(reference, _id_responseMessage, value.reference); | |
| static final _id_instanceFollowRedirects = jni.Jni.accessors.getFieldIDOf( | |
| _class.reference, | |
| r"instanceFollowRedirects", | |
| r"Z", | |
| ); | |
| /// from: protected boolean instanceFollowRedirects | |
| bool get instanceFollowRedirects => jni.Jni.accessors | |
| .getField( | |
| reference, _id_instanceFollowRedirects, jni.JniCallType.booleanType) | |
| .boolean; | |
| /// from: protected boolean instanceFollowRedirects | |
| set instanceFollowRedirects(bool value) => jni.Jni.env | |
| .SetBooleanField(reference, _id_instanceFollowRedirects, value ? 1 : 0); | |
| /// from: static public final int HTTP_OK | |
| static const HTTP_OK = 200; | |
| /// from: static public final int HTTP_CREATED | |
| static const HTTP_CREATED = 201; | |
| /// from: static public final int HTTP_ACCEPTED | |
| static const HTTP_ACCEPTED = 202; | |
| /// from: static public final int HTTP_NOT_AUTHORITATIVE | |
| static const HTTP_NOT_AUTHORITATIVE = 203; | |
| /// from: static public final int HTTP_NO_CONTENT | |
| static const HTTP_NO_CONTENT = 204; | |
| /// from: static public final int HTTP_RESET | |
| static const HTTP_RESET = 205; | |
| /// from: static public final int HTTP_PARTIAL | |
| static const HTTP_PARTIAL = 206; | |
| /// from: static public final int HTTP_MULT_CHOICE | |
| static const HTTP_MULT_CHOICE = 300; | |
| /// from: static public final int HTTP_MOVED_PERM | |
| static const HTTP_MOVED_PERM = 301; | |
| /// from: static public final int HTTP_MOVED_TEMP | |
| static const HTTP_MOVED_TEMP = 302; | |
| /// from: static public final int HTTP_SEE_OTHER | |
| static const HTTP_SEE_OTHER = 303; | |
| /// from: static public final int HTTP_NOT_MODIFIED | |
| static const HTTP_NOT_MODIFIED = 304; | |
| /// from: static public final int HTTP_USE_PROXY | |
| static const HTTP_USE_PROXY = 305; | |
| /// from: static public final int HTTP_BAD_REQUEST | |
| static const HTTP_BAD_REQUEST = 400; | |
| /// from: static public final int HTTP_UNAUTHORIZED | |
| static const HTTP_UNAUTHORIZED = 401; | |
| /// from: static public final int HTTP_PAYMENT_REQUIRED | |
| static const HTTP_PAYMENT_REQUIRED = 402; | |
| /// from: static public final int HTTP_FORBIDDEN | |
| static const HTTP_FORBIDDEN = 403; | |
| /// from: static public final int HTTP_NOT_FOUND | |
| static const HTTP_NOT_FOUND = 404; | |
| /// from: static public final int HTTP_BAD_METHOD | |
| static const HTTP_BAD_METHOD = 405; | |
| /// from: static public final int HTTP_NOT_ACCEPTABLE | |
| static const HTTP_NOT_ACCEPTABLE = 406; | |
| /// from: static public final int HTTP_PROXY_AUTH | |
| static const HTTP_PROXY_AUTH = 407; | |
| /// from: static public final int HTTP_CLIENT_TIMEOUT | |
| static const HTTP_CLIENT_TIMEOUT = 408; | |
| /// from: static public final int HTTP_CONFLICT | |
| static const HTTP_CONFLICT = 409; | |
| /// from: static public final int HTTP_GONE | |
| static const HTTP_GONE = 410; | |
| /// from: static public final int HTTP_LENGTH_REQUIRED | |
| static const HTTP_LENGTH_REQUIRED = 411; | |
| /// from: static public final int HTTP_PRECON_FAILED | |
| static const HTTP_PRECON_FAILED = 412; | |
| /// from: static public final int HTTP_ENTITY_TOO_LARGE | |
| static const HTTP_ENTITY_TOO_LARGE = 413; | |
| /// from: static public final int HTTP_REQ_TOO_LONG | |
| static const HTTP_REQ_TOO_LONG = 414; | |
| /// from: static public final int HTTP_UNSUPPORTED_TYPE | |
| static const HTTP_UNSUPPORTED_TYPE = 415; | |
| /// from: static public final int HTTP_SERVER_ERROR | |
| static const HTTP_SERVER_ERROR = 500; | |
| /// from: static public final int HTTP_INTERNAL_ERROR | |
| static const HTTP_INTERNAL_ERROR = 500; | |
| /// from: static public final int HTTP_NOT_IMPLEMENTED | |
| static const HTTP_NOT_IMPLEMENTED = 501; | |
| /// from: static public final int HTTP_BAD_GATEWAY | |
| static const HTTP_BAD_GATEWAY = 502; | |
| /// from: static public final int HTTP_UNAVAILABLE | |
| static const HTTP_UNAVAILABLE = 503; | |
| /// from: static public final int HTTP_GATEWAY_TIMEOUT | |
| static const HTTP_GATEWAY_TIMEOUT = 504; | |
| /// from: static public final int HTTP_VERSION | |
| static const HTTP_VERSION = 505; | |
| static final _id_setAuthenticator = jni.Jni.accessors.getMethodIDOf( | |
| _class.reference, r"setAuthenticator", r"(Ljava/net/Authenticator;)V"); | |
| /// from: public void setAuthenticator(java.net.Authenticator authenticator) | |
| void setAuthenticator( | |
| jni.JObject authenticator, | |
| ) { | |
| return jni.Jni.accessors.callMethodWithArgs(reference, _id_setAuthenticator, | |
| jni.JniCallType.voidType, [authenticator.reference]).check(); | |
| } | |
| static final _id_getHeaderFieldKey = jni.Jni.accessors.getMethodIDOf( | |
| _class.reference, r"getHeaderFieldKey", r"(I)Ljava/lang/String;"); | |
| /// from: public java.lang.String getHeaderFieldKey(int i) | |
| /// The returned object must be deleted after use, by calling the `delete` method. | |
| jni.JString getHeaderFieldKey( | |
| int i, | |
| ) { | |
| return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( | |
| reference, | |
| _id_getHeaderFieldKey, | |
| jni.JniCallType.objectType, | |
| [jni.JValueInt(i)]).object); | |
| } | |
| static final _id_setFixedLengthStreamingMode = jni.Jni.accessors | |
| .getMethodIDOf(_class.reference, r"setFixedLengthStreamingMode", r"(I)V"); | |
| /// from: public void setFixedLengthStreamingMode(int i) | |
| void setFixedLengthStreamingMode( | |
| int i, | |
| ) { | |
| return jni.Jni.accessors.callMethodWithArgs( | |
| reference, | |
| _id_setFixedLengthStreamingMode, | |
| jni.JniCallType.voidType, | |
| [jni.JValueInt(i)]).check(); | |
| } | |
| static final _id_setFixedLengthStreamingMode1 = jni.Jni.accessors | |
| .getMethodIDOf(_class.reference, r"setFixedLengthStreamingMode", r"(J)V"); | |
| /// from: public void setFixedLengthStreamingMode(long j) | |
| void setFixedLengthStreamingMode1( | |
| int j, | |
| ) { | |
| return jni.Jni.accessors.callMethodWithArgs( | |
| reference, | |
| _id_setFixedLengthStreamingMode1, | |
| jni.JniCallType.voidType, | |
| [j]).check(); | |
| } | |
| static final _id_setChunkedStreamingMode = jni.Jni.accessors | |
| .getMethodIDOf(_class.reference, r"setChunkedStreamingMode", r"(I)V"); | |
| /// from: public void setChunkedStreamingMode(int i) | |
| void setChunkedStreamingMode( | |
| int i, | |
| ) { | |
| return jni.Jni.accessors.callMethodWithArgs( | |
| reference, | |
| _id_setChunkedStreamingMode, | |
| jni.JniCallType.voidType, | |
| [jni.JValueInt(i)]).check(); | |
| } | |
| static final _id_getHeaderField1 = jni.Jni.accessors.getMethodIDOf( | |
| _class.reference, r"getHeaderField", r"(I)Ljava/lang/String;"); | |
| /// from: public java.lang.String getHeaderField(int i) | |
| /// The returned object must be deleted after use, by calling the `delete` method. | |
| jni.JString getHeaderField1( | |
| int i, | |
| ) { | |
| return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( | |
| reference, | |
| _id_getHeaderField1, | |
| jni.JniCallType.objectType, | |
| [jni.JValueInt(i)]).object); | |
| } | |
| static final _id_ctor = jni.Jni.accessors | |
| .getMethodIDOf(_class.reference, r"<init>", r"(Ljava/net/URL;)V"); | |
| /// from: protected void <init>(java.net.URL uRL) | |
| /// The returned object must be deleted after use, by calling the `delete` method. | |
| factory HttpURLConnection( | |
| url_.URL uRL, | |
| ) { | |
| return HttpURLConnection.fromRef(jni.Jni.accessors | |
| .newObjectWithArgs(_class.reference, _id_ctor, [uRL.reference]).object); | |
| } | |
| static final _id_setFollowRedirects = jni.Jni.accessors | |
| .getStaticMethodIDOf(_class.reference, r"setFollowRedirects", r"(Z)V"); | |
| /// from: static public void setFollowRedirects(boolean z) | |
| static void setFollowRedirects( | |
| bool z, | |
| ) { | |
| return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, | |
| _id_setFollowRedirects, jni.JniCallType.voidType, [z ? 1 : 0]).check(); | |
| } | |
| static final _id_getFollowRedirects = jni.Jni.accessors | |
| .getStaticMethodIDOf(_class.reference, r"getFollowRedirects", r"()Z"); | |
| /// from: static public boolean getFollowRedirects() | |
| static bool getFollowRedirects() { | |
| return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, | |
| _id_getFollowRedirects, jni.JniCallType.booleanType, []).boolean; | |
| } | |
| static final _id_setInstanceFollowRedirects = jni.Jni.accessors | |
| .getMethodIDOf(_class.reference, r"setInstanceFollowRedirects", r"(Z)V"); | |
| /// from: public void setInstanceFollowRedirects(boolean z) | |
| void setInstanceFollowRedirects( | |
| bool z, | |
| ) { | |
| return jni.Jni.accessors.callMethodWithArgs( | |
| reference, | |
| _id_setInstanceFollowRedirects, | |
| jni.JniCallType.voidType, | |
| [z ? 1 : 0]).check(); | |
| } | |
| static final _id_getInstanceFollowRedirects = jni.Jni.accessors | |
| .getMethodIDOf(_class.reference, r"getInstanceFollowRedirects", r"()Z"); | |
| /// from: public boolean getInstanceFollowRedirects() | |
| bool getInstanceFollowRedirects() { | |
| return jni.Jni.accessors.callMethodWithArgs( | |
| reference, | |
| _id_getInstanceFollowRedirects, | |
| jni.JniCallType.booleanType, []).boolean; | |
| } | |
| static final _id_setRequestMethod = jni.Jni.accessors.getMethodIDOf( | |
| _class.reference, r"setRequestMethod", r"(Ljava/lang/String;)V"); | |
| /// from: public void setRequestMethod(java.lang.String string) | |
| void setRequestMethod( | |
| jni.JString string, | |
| ) { | |
| return jni.Jni.accessors.callMethodWithArgs(reference, _id_setRequestMethod, | |
| jni.JniCallType.voidType, [string.reference]).check(); | |
| } | |
| static final _id_getRequestMethod = jni.Jni.accessors.getMethodIDOf( | |
| _class.reference, r"getRequestMethod", r"()Ljava/lang/String;"); | |
| /// from: public java.lang.String getRequestMethod() | |
| /// The returned object must be deleted after use, by calling the `delete` method. | |
| jni.JString getRequestMethod() { | |
| return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( | |
| reference, | |
| _id_getRequestMethod, | |
| jni.JniCallType.objectType, []).object); | |
| } | |
| static final _id_getResponseCode = jni.Jni.accessors | |
| .getMethodIDOf(_class.reference, r"getResponseCode", r"()I"); | |
| /// from: public int getResponseCode() | |
| int getResponseCode() { | |
| return jni.Jni.accessors.callMethodWithArgs( | |
| reference, _id_getResponseCode, jni.JniCallType.intType, []).integer; | |
| } | |
| static final _id_getResponseMessage = jni.Jni.accessors.getMethodIDOf( | |
| _class.reference, r"getResponseMessage", r"()Ljava/lang/String;"); | |
| /// from: public java.lang.String getResponseMessage() | |
| /// The returned object must be deleted after use, by calling the `delete` method. | |
| jni.JString getResponseMessage() { | |
| return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( | |
| reference, | |
| _id_getResponseMessage, | |
| jni.JniCallType.objectType, []).object); | |
| } | |
| static final _id_getHeaderFieldDate = jni.Jni.accessors.getMethodIDOf( | |
| _class.reference, r"getHeaderFieldDate", r"(Ljava/lang/String;J)J"); | |
| /// from: public long getHeaderFieldDate(java.lang.String string, long j) | |
| int getHeaderFieldDate( | |
| jni.JString string, | |
| int j, | |
| ) { | |
| return jni.Jni.accessors.callMethodWithArgs( | |
| reference, | |
| _id_getHeaderFieldDate, | |
| jni.JniCallType.longType, | |
| [string.reference, j]).long; | |
| } | |
| static final _id_disconnect = | |
| jni.Jni.accessors.getMethodIDOf(_class.reference, r"disconnect", r"()V"); | |
| /// from: public abstract void disconnect() | |
| void disconnect() { | |
| return jni.Jni.accessors.callMethodWithArgs( | |
| reference, _id_disconnect, jni.JniCallType.voidType, []).check(); | |
| } | |
| static final _id_usingProxy = | |
| jni.Jni.accessors.getMethodIDOf(_class.reference, r"usingProxy", r"()Z"); | |
| /// from: public abstract boolean usingProxy() | |
| bool usingProxy() { | |
| return jni.Jni.accessors.callMethodWithArgs( | |
| reference, _id_usingProxy, jni.JniCallType.booleanType, []).boolean; | |
| } | |
| static final _id_getPermission = jni.Jni.accessors.getMethodIDOf( | |
| _class.reference, r"getPermission", r"()Ljava/security/Permission;"); | |
| /// from: public java.security.Permission getPermission() | |
| /// The returned object must be deleted after use, by calling the `delete` method. | |
| jni.JObject getPermission() { | |
| return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( | |
| reference, _id_getPermission, jni.JniCallType.objectType, []).object); | |
| } | |
| static final _id_getErrorStream = jni.Jni.accessors.getMethodIDOf( | |
| _class.reference, r"getErrorStream", r"()Ljava/io/InputStream;"); | |
| /// from: public java.io.InputStream getErrorStream() | |
| /// The returned object must be deleted after use, by calling the `delete` method. | |
| inputstream_.InputStream getErrorStream() { | |
| return const inputstream_.$InputStreamType().fromRef(jni.Jni.accessors | |
| .callMethodWithArgs(reference, _id_getErrorStream, | |
| jni.JniCallType.objectType, []).object); | |
| } | |
| } | |
| class $HttpURLConnectionType extends jni.JObjType<HttpURLConnection> { | |
| const $HttpURLConnectionType(); | |
| @override | |
| String get signature => r"Ljava/net/HttpURLConnection;"; | |
| @override | |
| HttpURLConnection fromRef(jni.JObjectPtr ref) => | |
| HttpURLConnection.fromRef(ref); | |
| @override | |
| jni.JObjType get superType => const urlconnection_.$URLConnectionType(); | |
| @override | |
| final superCount = 2; | |
| @override | |
| int get hashCode => ($HttpURLConnectionType).hashCode; | |
| @override | |
| bool operator ==(Object other) { | |
| return other.runtimeType == ($HttpURLConnectionType) && | |
| other is $HttpURLConnectionType; | |
| } | |
| } |