diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml deleted file mode 100644 index f9ae20d336..0000000000 --- a/.github/workflows/java.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: package:java_http CI - -on: - push: - branches: - - main - - master - paths: - - '.github/workflows/java.yml' - - 'pkgs/http_client_conformance_tests/**' - - 'pkgs/java_http/**' - pull_request: - paths: - - '.github/workflows/java.yml' - - 'pkgs/http_client_conformance_tests/**' - - 'pkgs/java_http/**' - schedule: - # Runs every Sunday at midnight (00:00 UTC). - - cron: "0 0 * * 0" - -env: - PUB_ENVIRONMENT: bot.github - -jobs: - verify: - name: Format & Analyze & Test - runs-on: ubuntu-latest - defaults: - run: - working-directory: pkgs/java_http - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 - with: - channel: 'stable' - - id: install - name: Install dependencies - run: dart pub get - - name: Check formatting - run: dart format --output=none --set-exit-if-changed . - if: always() && steps.install.outcome == 'success' - - name: Analyze code - run: dart analyze --fatal-infos - if: always() && steps.install.outcome == 'success' - - name: Build jni dynamic libraries - run: dart run jni:setup - - name: Run tests - run: dart test diff --git a/pkgs/java_http/.gitattributes b/pkgs/java_http/.gitattributes deleted file mode 100644 index 9def68ab79..0000000000 --- a/pkgs/java_http/.gitattributes +++ /dev/null @@ -1,5 +0,0 @@ -# Vendored code is excluded from language stats in the GitHub repo. -lib/src/third_party/** linguist-vendored - -# jnigen generated code is hidden in GitHub diffs. -lib/src/third_party/java/** linguist-generated diff --git a/pkgs/java_http/.gitignore b/pkgs/java_http/.gitignore deleted file mode 100644 index 28e4a6c94b..0000000000 --- a/pkgs/java_http/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -build/ -.flutter-plugins -.flutter-plugins-dependencies diff --git a/pkgs/java_http/CHANGELOG.md b/pkgs/java_http/CHANGELOG.md deleted file mode 100644 index 65e52db74c..0000000000 --- a/pkgs/java_http/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -## 0.0.1 - -- Initial development release. diff --git a/pkgs/java_http/LICENSE b/pkgs/java_http/LICENSE deleted file mode 100644 index cf6aefe5df..0000000000 --- a/pkgs/java_http/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2023, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/pkgs/java_http/README.md b/pkgs/java_http/README.md deleted file mode 100644 index 5f54bd298b..0000000000 --- a/pkgs/java_http/README.md +++ /dev/null @@ -1,25 +0,0 @@ -A Dart package for making HTTP requests using native Java APIs -([java.net.HttpURLConnection](https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html)). - -Using native Java APIs has several advantages on Android: - - * Support for `KeyStore` `PrivateKey`s ([#50669](https://github.com/dart-lang/sdk/issues/50669)) - * Support for the system proxy ([#50434](https://github.com/dart-lang/sdk/issues/50434)) - * Support for user-installed certificates ([#50435](https://github.com/dart-lang/sdk/issues/50435)) - -## Status: Experimental - -**NOTE**: This package is currently experimental and published under the -[labs.dart.dev](https://dart.dev/dart-team-packages) pub publisher in order to -solicit feedback. - -For packages in the labs.dart.dev publisher we generally plan to either graduate -the package into a supported publisher (dart.dev, tools.dart.dev) after a period -of feedback and iteration, or discontinue the package. These packages have a -much higher expected rate of API and breaking changes. - -Your feedback is valuable and will help us evolve this package. -For general feedback and suggestions please comment in the -[feedback issue](https://github.com/dart-lang/http/issues/764). -For bugs, please file an issue in the -[bug tracker](https://github.com/dart-lang/http/issues). \ No newline at end of file diff --git a/pkgs/java_http/analysis_options.yaml b/pkgs/java_http/analysis_options.yaml deleted file mode 100644 index 1bff4c9f23..0000000000 --- a/pkgs/java_http/analysis_options.yaml +++ /dev/null @@ -1,5 +0,0 @@ -include: ../../analysis_options.yaml - -analyzer: - exclude: - - lib/src/third_party/** diff --git a/pkgs/java_http/example/java_http_example.dart b/pkgs/java_http/example/java_http_example.dart deleted file mode 100644 index 8b5e33d6f5..0000000000 --- a/pkgs/java_http/example/java_http_example.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// This code was generated by the Dart create command with the package template. - -import 'package:java_http/java_http.dart'; - -void main() { - var awesome = Awesome(); - print('awesome: ${awesome.isAwesome}'); -} diff --git a/pkgs/java_http/jnigen.yaml b/pkgs/java_http/jnigen.yaml deleted file mode 100644 index a99320fc26..0000000000 --- a/pkgs/java_http/jnigen.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# Regenerate bindings with `dart run jnigen --config jnigen.yaml`. - -summarizer: - backend: asm - -output: - bindings_type: dart_only - dart: - path: 'lib/src/third_party/' - -class_path: - - 'classes.jar' - -classes: - - 'java.io.BufferedInputStream' - - 'java.io.InputStream' - - 'java.io.OutputStream' - - 'java.lang.System' - - 'java.net.HttpURLConnection' - - 'java.net.URL' - - 'java.net.URLConnection' diff --git a/pkgs/java_http/lib/java_http.dart b/pkgs/java_http/lib/java_http.dart deleted file mode 100644 index 743aa40223..0000000000 --- a/pkgs/java_http/lib/java_http.dart +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -export 'src/java_client.dart'; -export 'src/java_http_base.dart'; diff --git a/pkgs/java_http/lib/src/java_client.dart b/pkgs/java_http/lib/src/java_client.dart deleted file mode 100644 index 379c640b1d..0000000000 --- a/pkgs/java_http/lib/src/java_client.dart +++ /dev/null @@ -1,291 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'dart:async'; -import 'dart:io'; -import 'dart:isolate'; -import 'dart:typed_data'; - -import 'package:async/async.dart'; -import 'package:http/http.dart'; -import 'package:jni/jni.dart'; -import 'package:path/path.dart'; - -import 'third_party/java/io/BufferedInputStream.dart'; -import 'third_party/java/lang/System.dart'; -import 'third_party/java/net/HttpURLConnection.dart'; -import 'third_party/java/net/URL.dart'; - -final _digitRegex = RegExp(r'^\d+$'); - -// TODO: Add a description of the implementation. -// Look at the description of cronet_client.dart and cupertino_client.dart for -// examples. -// See https://github.com/dart-lang/http/pull/980#discussion_r1253697461. -class JavaClient extends BaseClient { - void _initJVM() { - if (!Platform.isAndroid) { - Jni.spawnIfNotExists(dylibDir: join('build', 'jni_libs')); - } - - // TODO: Determine if we can remove this. - // It's a workaround to fix the tests not passing on GitHub CI. - // See https://github.com/dart-lang/http/pull/987#issuecomment-1636170371. - System.setProperty( - 'java.net.preferIPv6Addresses'.toJString(), 'true'.toJString()); - } - - @override - Future send(BaseRequest request) async { - // TODO: Move the call to _initJVM() to the JavaClient constructor. - // See https://github.com/dart-lang/http/pull/980#discussion_r1253700470. - _initJVM(); - - final receivePort = ReceivePort(); - final events = StreamQueue(receivePort); - - // We can't send a StreamedRequest to another Isolate. - // But we can send Map, String, UInt8List, Uri. - final isolateRequest = ( - sendPort: receivePort.sendPort, - url: request.url, - method: request.method, - headers: request.headers, - body: await request.finalize().toBytes(), - ); - - // Could create a new class to hold the data for the isolate instead - // of using a record. - await Isolate.spawn(_isolateMethod, isolateRequest); - - final statusCodeEvent = await events.next; - late int statusCode; - if (statusCodeEvent is ClientException) { - // Do we need to close the ReceivePort here as well? - receivePort.close(); - throw statusCodeEvent; - } else { - statusCode = statusCodeEvent as int; - } - - final reasonPhrase = await events.next as String?; - final responseHeaders = await events.next as Map; - - Stream> responseBodyStream(Stream events) async* { - try { - await for (final event in events) { - if (event is List) { - yield event; - } else if (event is ClientException) { - throw event; - } else if (event == null) { - return; - } - } - } finally { - // TODO: Should we kill the isolate here? - receivePort.close(); - } - } - - return StreamedResponse(responseBodyStream(events.rest), statusCode, - contentLength: _parseContentLengthHeader(request.url, responseHeaders), - request: request, - headers: responseHeaders, - reasonPhrase: reasonPhrase); - } - - // TODO: Rename _isolateMethod to something more descriptive. - Future _isolateMethod( - ({ - SendPort sendPort, - Uint8List body, - Map headers, - String method, - Uri url, - }) request, - ) async { - final httpUrlConnection = URL - .ctor3(request.url.toString().toJString()) - .openConnection() - .castTo(HttpURLConnection.type, deleteOriginal: true); - - request.headers.forEach((headerName, headerValue) { - httpUrlConnection.setRequestProperty( - headerName.toJString(), headerValue.toJString()); - }); - - httpUrlConnection.setRequestMethod(request.method.toJString()); - _setRequestBody(httpUrlConnection, request.body); - - try { - final statusCode = _statusCode(request.url, httpUrlConnection); - request.sendPort.send(statusCode); - } on ClientException catch (e) { - request.sendPort.send(e); - httpUrlConnection.disconnect(); - return; - } - - final reasonPhrase = _reasonPhrase(httpUrlConnection); - request.sendPort.send(reasonPhrase); - - final responseHeaders = _responseHeaders(httpUrlConnection); - request.sendPort.send(responseHeaders); - - // TODO: Throws a ClientException if the content length header is invalid. - // I think we need to send the ClientException over the SendPort. - final contentLengthHeader = _parseContentLengthHeader( - request.url, - responseHeaders, - ); - - await _responseBody( - request.url, - httpUrlConnection, - request.sendPort, - contentLengthHeader, - ); - - httpUrlConnection.disconnect(); - - // Signals to the receiving isolate that we are done sending events. - request.sendPort.send(null); - } - - void _setRequestBody( - HttpURLConnection httpUrlConnection, - Uint8List requestBody, - ) { - if (requestBody.isEmpty) return; - - httpUrlConnection.setDoOutput(true); - - httpUrlConnection.getOutputStream() - ..write1(requestBody.toJArray()) - ..flush() - ..close(); - } - - int _statusCode(Uri requestUrl, HttpURLConnection httpUrlConnection) { - final statusCode = httpUrlConnection.getResponseCode(); - - if (statusCode == -1) { - throw ClientException( - 'Status code can not be discerned from the response.', requestUrl); - } - - return statusCode; - } - - String? _reasonPhrase(HttpURLConnection httpUrlConnection) { - final reasonPhrase = httpUrlConnection.getResponseMessage(); - - return reasonPhrase.isNull - ? null - : reasonPhrase.toDartString(deleteOriginal: true); - } - - Map _responseHeaders(HttpURLConnection httpUrlConnection) { - final headers = >{}; - - for (var i = 0;; i++) { - final headerName = httpUrlConnection.getHeaderFieldKey(i); - final headerValue = httpUrlConnection.getHeaderField1(i); - - // If the header name and header value are both null then we have reached - // the end of the response headers. - if (headerName.isNull && headerValue.isNull) break; - - // The HTTP response header status line is returned as a header field - // where the field key is null and the field is the status line. - // Other package:http implementations don't include the status line as a - // header. So we don't add the status line to the headers. - if (headerName.isNull) continue; - - headers - .putIfAbsent(headerName.toDartString().toLowerCase(), () => []) - .add(headerValue.toDartString()); - } - - return headers.map((key, value) => MapEntry(key, value.join(','))); - } - - int? _parseContentLengthHeader( - Uri requestUrl, - Map headers, - ) { - int? contentLength; - switch (headers['content-length']) { - case final contentLengthHeader? - when !_digitRegex.hasMatch(contentLengthHeader): - throw ClientException( - 'Invalid content-length header [$contentLengthHeader].', - requestUrl, - ); - case final contentLengthHeader?: - contentLength = int.parse(contentLengthHeader); - } - - return contentLength; - } - - Future _responseBody( - Uri requestUrl, - HttpURLConnection httpUrlConnection, - SendPort sendPort, - int? expectedBodyLength, - ) async { - final responseCode = httpUrlConnection.getResponseCode(); - - final responseBodyStream = (responseCode >= 200 && responseCode <= 299) - ? BufferedInputStream(httpUrlConnection.getInputStream()) - : BufferedInputStream(httpUrlConnection.getErrorStream()); - - var actualBodyLength = 0; - final bytesBuffer = JArray(jbyte.type, 4096); - - while (true) { - // TODO: read1() could throw IOException. - final bytesCount = - responseBodyStream.read1(bytesBuffer, 0, bytesBuffer.length); - - if (bytesCount == -1) { - break; - } - - if (bytesCount == 0) { - // No more data is available without blocking so give other Isolates an - // opportunity to run. - await Future.delayed(Duration.zero); - continue; - } - - sendPort.send(bytesBuffer.toUint8List(length: bytesCount)); - actualBodyLength += bytesCount; - } - - if (expectedBodyLength != null && actualBodyLength < expectedBodyLength) { - sendPort.send(ClientException('Unexpected end of body', requestUrl)); - } - - responseBodyStream.close(); - } -} - -extension on Uint8List { - JArray toJArray() => - JArray(jbyte.type, length)..setRange(0, length, this); -} - -extension on JArray { - Uint8List toUint8List({int? length}) { - length ??= this.length; - final list = Uint8List(length); - for (var i = 0; i < length; i++) { - list[i] = this[i]; - } - return list; - } -} diff --git a/pkgs/java_http/lib/src/java_http_base.dart b/pkgs/java_http/lib/src/java_http_base.dart deleted file mode 100644 index 8660e18936..0000000000 --- a/pkgs/java_http/lib/src/java_http_base.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// This code was generated by the Dart create command with the package template. - -class Awesome { - bool get isAwesome => true; -} diff --git a/pkgs/java_http/lib/src/third_party/java/io/BufferedInputStream.dart b/pkgs/java_http/lib/src/third_party/java/io/BufferedInputStream.dart deleted file mode 100644 index c732e12b0c..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/io/BufferedInputStream.dart +++ /dev/null @@ -1,248 +0,0 @@ -// 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 "InputStream.dart" as inputstream_; - -/// from: java.io.BufferedInputStream -class BufferedInputStream extends jni.JObject { - @override - late final jni.JObjType $type = type; - - BufferedInputStream.fromRef( - jni.JObjectPtr ref, - ) : super.fromRef(ref); - - static final _class = jni.Jni.findJClass(r"java/io/BufferedInputStream"); - - /// The type which includes information such as the signature of this class. - static const type = $BufferedInputStreamType(); - static final _id_buf = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"buf", - r"[B", - ); - - /// from: protected byte[] buf - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JArray get buf => - const jni.JArrayType(jni.jbyteType()).fromRef(jni.Jni.accessors - .getField(reference, _id_buf, jni.JniCallType.objectType) - .object); - - /// from: protected byte[] buf - /// The returned object must be deleted after use, by calling the `delete` method. - set buf(jni.JArray value) => - jni.Jni.env.SetObjectField(reference, _id_buf, value.reference); - - static final _id_count = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"count", - r"I", - ); - - /// from: protected int count - int get count => jni.Jni.accessors - .getField(reference, _id_count, jni.JniCallType.intType) - .integer; - - /// from: protected int count - set count(int value) => jni.Jni.env.SetIntField(reference, _id_count, value); - - static final _id_pos = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"pos", - r"I", - ); - - /// from: protected int pos - int get pos => jni.Jni.accessors - .getField(reference, _id_pos, jni.JniCallType.intType) - .integer; - - /// from: protected int pos - set pos(int value) => jni.Jni.env.SetIntField(reference, _id_pos, value); - - static final _id_markpos = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"markpos", - r"I", - ); - - /// from: protected int markpos - int get markpos => jni.Jni.accessors - .getField(reference, _id_markpos, jni.JniCallType.intType) - .integer; - - /// from: protected int markpos - set markpos(int value) => - jni.Jni.env.SetIntField(reference, _id_markpos, value); - - static final _id_marklimit = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"marklimit", - r"I", - ); - - /// from: protected int marklimit - int get marklimit => jni.Jni.accessors - .getField(reference, _id_marklimit, jni.JniCallType.intType) - .integer; - - /// from: protected int marklimit - set marklimit(int value) => - jni.Jni.env.SetIntField(reference, _id_marklimit, value); - - static final _id_ctor = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"", r"(Ljava/io/InputStream;)V"); - - /// from: public void (java.io.InputStream inputStream) - /// The returned object must be deleted after use, by calling the `delete` method. - factory BufferedInputStream( - inputstream_.InputStream inputStream, - ) { - return BufferedInputStream.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, _id_ctor, [inputStream.reference]).object); - } - - static final _id_ctor1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"", r"(Ljava/io/InputStream;I)V"); - - /// from: public void (java.io.InputStream inputStream, int i) - /// The returned object must be deleted after use, by calling the `delete` method. - factory BufferedInputStream.ctor1( - inputstream_.InputStream inputStream, - int i, - ) { - return BufferedInputStream.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, - _id_ctor1, - [inputStream.reference, jni.JValueInt(i)]).object); - } - - static final _id_read = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"read", r"()I"); - - /// from: public int read() - int read() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_read, jni.JniCallType.intType, []).integer; - } - - static final _id_read1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"read", r"([BII)I"); - - /// from: public int read(byte[] bs, int i, int i1) - int read1( - jni.JArray bs, - int i, - int i1, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_read1, - jni.JniCallType.intType, - [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).integer; - } - - static final _id_skip = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"skip", r"(J)J"); - - /// from: public long skip(long j) - int skip( - int j, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_skip, jni.JniCallType.longType, [j]).long; - } - - static final _id_available = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"available", r"()I"); - - /// from: public int available() - int available() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_available, jni.JniCallType.intType, []).integer; - } - - static final _id_mark = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"mark", r"(I)V"); - - /// from: public void mark(int i) - void mark( - int i, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_mark, - jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); - } - - static final _id_reset = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"reset", r"()V"); - - /// from: public void reset() - void reset() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_reset, jni.JniCallType.voidType, []).check(); - } - - static final _id_markSupported = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"markSupported", r"()Z"); - - /// from: public boolean markSupported() - bool markSupported() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_markSupported, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_close = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"close", r"()V"); - - /// from: public void close() - void close() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_close, jni.JniCallType.voidType, []).check(); - } -} - -class $BufferedInputStreamType extends jni.JObjType { - const $BufferedInputStreamType(); - - @override - String get signature => r"Ljava/io/BufferedInputStream;"; - - @override - BufferedInputStream fromRef(jni.JObjectPtr ref) => - BufferedInputStream.fromRef(ref); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($BufferedInputStreamType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($BufferedInputStreamType) && - other is $BufferedInputStreamType; - } -} diff --git a/pkgs/java_http/lib/src/third_party/java/io/InputStream.dart b/pkgs/java_http/lib/src/third_party/java/io/InputStream.dart deleted file mode 100644 index 3b930d49cd..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/io/InputStream.dart +++ /dev/null @@ -1,226 +0,0 @@ -// 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 "OutputStream.dart" as outputstream_; - -/// from: java.io.InputStream -class InputStream extends jni.JObject { - @override - late final jni.JObjType $type = type; - - InputStream.fromRef( - jni.JObjectPtr ref, - ) : super.fromRef(ref); - - static final _class = jni.Jni.findJClass(r"java/io/InputStream"); - - /// The type which includes information such as the signature of this class. - static const type = $InputStreamType(); - static final _id_ctor = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"", r"()V"); - - /// from: public void () - /// The returned object must be deleted after use, by calling the `delete` method. - factory InputStream() { - return InputStream.fromRef(jni.Jni.accessors - .newObjectWithArgs(_class.reference, _id_ctor, []).object); - } - - static final _id_nullInputStream = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"nullInputStream", r"()Ljava/io/InputStream;"); - - /// from: static public java.io.InputStream nullInputStream() - /// The returned object must be deleted after use, by calling the `delete` method. - static InputStream nullInputStream() { - return const $InputStreamType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_nullInputStream, - jni.JniCallType.objectType, []).object); - } - - static final _id_read = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"read", r"()I"); - - /// from: public abstract int read() - int read() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_read, jni.JniCallType.intType, []).integer; - } - - static final _id_read1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"read", r"([B)I"); - - /// from: public int read(byte[] bs) - int read1( - jni.JArray bs, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_read1, jni.JniCallType.intType, [bs.reference]).integer; - } - - static final _id_read2 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"read", r"([BII)I"); - - /// from: public int read(byte[] bs, int i, int i1) - int read2( - jni.JArray bs, - int i, - int i1, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_read2, - jni.JniCallType.intType, - [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).integer; - } - - static final _id_readAllBytes = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"readAllBytes", r"()[B"); - - /// from: public byte[] readAllBytes() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JArray readAllBytes() { - return const jni.JArrayType(jni.jbyteType()).fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_readAllBytes, - jni.JniCallType.objectType, []).object); - } - - static final _id_readNBytes = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"readNBytes", r"(I)[B"); - - /// from: public byte[] readNBytes(int i) - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JArray readNBytes( - int i, - ) { - return const jni.JArrayType(jni.jbyteType()).fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_readNBytes, - jni.JniCallType.objectType, [jni.JValueInt(i)]).object); - } - - static final _id_readNBytes1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"readNBytes", r"([BII)I"); - - /// from: public int readNBytes(byte[] bs, int i, int i1) - int readNBytes1( - jni.JArray bs, - int i, - int i1, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_readNBytes1, - jni.JniCallType.intType, - [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).integer; - } - - static final _id_skip = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"skip", r"(J)J"); - - /// from: public long skip(long j) - int skip( - int j, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_skip, jni.JniCallType.longType, [j]).long; - } - - static final _id_available = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"available", r"()I"); - - /// from: public int available() - int available() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_available, jni.JniCallType.intType, []).integer; - } - - static final _id_close = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"close", r"()V"); - - /// from: public void close() - void close() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_close, jni.JniCallType.voidType, []).check(); - } - - static final _id_mark = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"mark", r"(I)V"); - - /// from: public void mark(int i) - void mark( - int i, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_mark, - jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); - } - - static final _id_reset = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"reset", r"()V"); - - /// from: public void reset() - void reset() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_reset, jni.JniCallType.voidType, []).check(); - } - - static final _id_markSupported = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"markSupported", r"()Z"); - - /// from: public boolean markSupported() - bool markSupported() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_markSupported, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_transferTo = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"transferTo", r"(Ljava/io/OutputStream;)J"); - - /// from: public long transferTo(java.io.OutputStream outputStream) - int transferTo( - outputstream_.OutputStream outputStream, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_transferTo, - jni.JniCallType.longType, [outputStream.reference]).long; - } -} - -class $InputStreamType extends jni.JObjType { - const $InputStreamType(); - - @override - String get signature => r"Ljava/io/InputStream;"; - - @override - InputStream fromRef(jni.JObjectPtr ref) => InputStream.fromRef(ref); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($InputStreamType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($InputStreamType) && other is $InputStreamType; - } -} diff --git a/pkgs/java_http/lib/src/third_party/java/io/OutputStream.dart b/pkgs/java_http/lib/src/third_party/java/io/OutputStream.dart deleted file mode 100644 index ce4966c0aa..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/io/OutputStream.dart +++ /dev/null @@ -1,136 +0,0 @@ -// 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; - -/// from: java.io.OutputStream -class OutputStream extends jni.JObject { - @override - late final jni.JObjType $type = type; - - OutputStream.fromRef( - jni.JObjectPtr ref, - ) : super.fromRef(ref); - - static final _class = jni.Jni.findJClass(r"java/io/OutputStream"); - - /// The type which includes information such as the signature of this class. - static const type = $OutputStreamType(); - static final _id_ctor = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"", r"()V"); - - /// from: public void () - /// The returned object must be deleted after use, by calling the `delete` method. - factory OutputStream() { - return OutputStream.fromRef(jni.Jni.accessors - .newObjectWithArgs(_class.reference, _id_ctor, []).object); - } - - static final _id_nullOutputStream = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"nullOutputStream", r"()Ljava/io/OutputStream;"); - - /// from: static public java.io.OutputStream nullOutputStream() - /// The returned object must be deleted after use, by calling the `delete` method. - static OutputStream nullOutputStream() { - return const $OutputStreamType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_nullOutputStream, - jni.JniCallType.objectType, []).object); - } - - static final _id_write = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"write", r"(I)V"); - - /// from: public abstract void write(int i) - void write( - int i, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_write, - jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); - } - - static final _id_write1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"write", r"([B)V"); - - /// from: public void write(byte[] bs) - void write1( - jni.JArray bs, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_write1, - jni.JniCallType.voidType, [bs.reference]).check(); - } - - static final _id_write2 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"write", r"([BII)V"); - - /// from: public void write(byte[] bs, int i, int i1) - void write2( - jni.JArray bs, - int i, - int i1, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_write2, - jni.JniCallType.voidType, - [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).check(); - } - - static final _id_flush = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"flush", r"()V"); - - /// from: public void flush() - void flush() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_flush, jni.JniCallType.voidType, []).check(); - } - - static final _id_close = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"close", r"()V"); - - /// from: public void close() - void close() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_close, jni.JniCallType.voidType, []).check(); - } -} - -class $OutputStreamType extends jni.JObjType { - const $OutputStreamType(); - - @override - String get signature => r"Ljava/io/OutputStream;"; - - @override - OutputStream fromRef(jni.JObjectPtr ref) => OutputStream.fromRef(ref); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($OutputStreamType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($OutputStreamType) && - other is $OutputStreamType; - } -} diff --git a/pkgs/java_http/lib/src/third_party/java/io/_package.dart b/pkgs/java_http/lib/src/third_party/java/io/_package.dart deleted file mode 100644 index a25d6e85d2..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/io/_package.dart +++ /dev/null @@ -1,3 +0,0 @@ -export "BufferedInputStream.dart"; -export "InputStream.dart"; -export "OutputStream.dart"; diff --git a/pkgs/java_http/lib/src/third_party/java/lang/System.dart b/pkgs/java_http/lib/src/third_party/java/lang/System.dart deleted file mode 100644 index 42b3b860d6..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/lang/System.dart +++ /dev/null @@ -1,466 +0,0 @@ -// 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 "../io/InputStream.dart" as inputstream_; - -/// from: java.lang.System -class System extends jni.JObject { - @override - late final jni.JObjType $type = type; - - System.fromRef( - jni.JObjectPtr ref, - ) : super.fromRef(ref); - - static final _class = jni.Jni.findJClass(r"java/lang/System"); - - /// The type which includes information such as the signature of this class. - static const type = $SystemType(); - static final _id_in0 = jni.Jni.accessors.getStaticFieldIDOf( - _class.reference, - r"in", - r"Ljava/io/InputStream;", - ); - - /// from: static public final java.io.InputStream in - /// The returned object must be deleted after use, by calling the `delete` method. - static inputstream_.InputStream get in0 => - const inputstream_.$InputStreamType().fromRef(jni.Jni.accessors - .getStaticField(_class.reference, _id_in0, jni.JniCallType.objectType) - .object); - - static final _id_out = jni.Jni.accessors.getStaticFieldIDOf( - _class.reference, - r"out", - r"Ljava/io/PrintStream;", - ); - - /// from: static public final java.io.PrintStream out - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject get out => - const jni.JObjectType().fromRef(jni.Jni.accessors - .getStaticField(_class.reference, _id_out, jni.JniCallType.objectType) - .object); - - static final _id_err = jni.Jni.accessors.getStaticFieldIDOf( - _class.reference, - r"err", - r"Ljava/io/PrintStream;", - ); - - /// from: static public final java.io.PrintStream err - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject get err => - const jni.JObjectType().fromRef(jni.Jni.accessors - .getStaticField(_class.reference, _id_err, jni.JniCallType.objectType) - .object); - - static final _id_setIn = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"setIn", r"(Ljava/io/InputStream;)V"); - - /// from: static public void setIn(java.io.InputStream inputStream) - static void setIn( - inputstream_.InputStream inputStream, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_setIn, jni.JniCallType.voidType, [inputStream.reference]).check(); - } - - static final _id_setOut = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"setOut", r"(Ljava/io/PrintStream;)V"); - - /// from: static public void setOut(java.io.PrintStream printStream) - static void setOut( - jni.JObject printStream, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_setOut, jni.JniCallType.voidType, [printStream.reference]).check(); - } - - static final _id_setErr = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"setErr", r"(Ljava/io/PrintStream;)V"); - - /// from: static public void setErr(java.io.PrintStream printStream) - static void setErr( - jni.JObject printStream, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_setErr, jni.JniCallType.voidType, [printStream.reference]).check(); - } - - static final _id_console = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"console", r"()Ljava/io/Console;"); - - /// from: static public java.io.Console console() - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject console() { - return const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_console, - jni.JniCallType.objectType, []).object); - } - - static final _id_inheritedChannel = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"inheritedChannel", r"()Ljava/nio/channels/Channel;"); - - /// from: static public java.nio.channels.Channel inheritedChannel() - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject inheritedChannel() { - return const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_inheritedChannel, - jni.JniCallType.objectType, []).object); - } - - static final _id_setSecurityManager = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"setSecurityManager", - r"(Ljava/lang/SecurityManager;)V"); - - /// from: static public void setSecurityManager(java.lang.SecurityManager securityManager) - static void setSecurityManager( - jni.JObject securityManager, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setSecurityManager, - jni.JniCallType.voidType, - [securityManager.reference]).check(); - } - - static final _id_getSecurityManager = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"getSecurityManager", - r"()Ljava/lang/SecurityManager;"); - - /// from: static public java.lang.SecurityManager getSecurityManager() - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject getSecurityManager() { - return const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_getSecurityManager, - jni.JniCallType.objectType, []).object); - } - - static final _id_currentTimeMillis = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"currentTimeMillis", r"()J"); - - /// from: static public native long currentTimeMillis() - static int currentTimeMillis() { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_currentTimeMillis, jni.JniCallType.longType, []).long; - } - - static final _id_nanoTime = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"nanoTime", r"()J"); - - /// from: static public native long nanoTime() - static int nanoTime() { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, _id_nanoTime, jni.JniCallType.longType, []).long; - } - - static final _id_arraycopy = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"arraycopy", - r"(Ljava/lang/Object;ILjava/lang/Object;II)V"); - - /// from: static public native void arraycopy(java.lang.Object object, int i, java.lang.Object object1, int i1, int i2) - static void arraycopy( - jni.JObject object, - int i, - jni.JObject object1, - int i1, - int i2, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, _id_arraycopy, jni.JniCallType.voidType, [ - object.reference, - jni.JValueInt(i), - object1.reference, - jni.JValueInt(i1), - jni.JValueInt(i2) - ]).check(); - } - - static final _id_identityHashCode = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"identityHashCode", r"(Ljava/lang/Object;)I"); - - /// from: static public native int identityHashCode(java.lang.Object object) - static int identityHashCode( - jni.JObject object, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_identityHashCode, - jni.JniCallType.intType, - [object.reference]).integer; - } - - static final _id_getProperties = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"getProperties", r"()Ljava/util/Properties;"); - - /// from: static public java.util.Properties getProperties() - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject getProperties() { - return const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_getProperties, - jni.JniCallType.objectType, []).object); - } - - static final _id_lineSeparator = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"lineSeparator", r"()Ljava/lang/String;"); - - /// from: static public java.lang.String lineSeparator() - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString lineSeparator() { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_lineSeparator, - jni.JniCallType.objectType, []).object); - } - - static final _id_setProperties = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"setProperties", r"(Ljava/util/Properties;)V"); - - /// from: static public void setProperties(java.util.Properties properties) - static void setProperties( - jni.JObject properties, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setProperties, - jni.JniCallType.voidType, - [properties.reference]).check(); - } - - static final _id_getProperty = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"getProperty", - r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public java.lang.String getProperty(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString getProperty( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_getProperty, - jni.JniCallType.objectType, [string.reference]).object); - } - - static final _id_getProperty1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"getProperty", - r"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public java.lang.String getProperty(java.lang.String string, java.lang.String string1) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString getProperty1( - jni.JString string, - jni.JString string1, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_getProperty1, - jni.JniCallType.objectType, - [string.reference, string1.reference]).object); - } - - static final _id_setProperty = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"setProperty", - r"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public java.lang.String setProperty(java.lang.String string, java.lang.String string1) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString setProperty( - jni.JString string, - jni.JString string1, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_setProperty, - jni.JniCallType.objectType, - [string.reference, string1.reference]).object); - } - - static final _id_clearProperty = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"clearProperty", - r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public java.lang.String clearProperty(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString clearProperty( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_clearProperty, - jni.JniCallType.objectType, [string.reference]).object); - } - - static final _id_getenv = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"getenv", r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public java.lang.String getenv(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString getenv( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_getenv, - jni.JniCallType.objectType, [string.reference]).object); - } - - static final _id_getenv1 = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"getenv", r"()Ljava/util/Map;"); - - /// from: static public java.util.Map getenv() - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JMap getenv1() { - return const jni.JMapType(jni.JStringType(), jni.JStringType()).fromRef( - jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_getenv1, jni.JniCallType.objectType, []).object); - } - - static final _id_getLogger = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"getLogger", - r"(Ljava/lang/String;)Ljava/lang/System$Logger;"); - - /// from: static public java.lang.System$Logger getLogger(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject getLogger( - jni.JString string, - ) { - return const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_getLogger, - jni.JniCallType.objectType, [string.reference]).object); - } - - static final _id_getLogger1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"getLogger", - r"(Ljava/lang/String;Ljava/util/ResourceBundle;)Ljava/lang/System$Logger;"); - - /// from: static public java.lang.System$Logger getLogger(java.lang.String string, java.util.ResourceBundle resourceBundle) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject getLogger1( - jni.JString string, - jni.JObject resourceBundle, - ) { - return const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_getLogger1, - jni.JniCallType.objectType, - [string.reference, resourceBundle.reference]).object); - } - - static final _id_exit = - jni.Jni.accessors.getStaticMethodIDOf(_class.reference, r"exit", r"(I)V"); - - /// from: static public void exit(int i) - static void exit( - int i, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_exit, jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); - } - - static final _id_gc = - jni.Jni.accessors.getStaticMethodIDOf(_class.reference, r"gc", r"()V"); - - /// from: static public void gc() - static void gc() { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, _id_gc, jni.JniCallType.voidType, []).check(); - } - - static final _id_runFinalization = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"runFinalization", r"()V"); - - /// from: static public void runFinalization() - static void runFinalization() { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_runFinalization, jni.JniCallType.voidType, []).check(); - } - - static final _id_load = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"load", r"(Ljava/lang/String;)V"); - - /// from: static public void load(java.lang.String string) - static void load( - jni.JString string, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_load, jni.JniCallType.voidType, [string.reference]).check(); - } - - static final _id_loadLibrary = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"loadLibrary", r"(Ljava/lang/String;)V"); - - /// from: static public void loadLibrary(java.lang.String string) - static void loadLibrary( - jni.JString string, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_loadLibrary, jni.JniCallType.voidType, [string.reference]).check(); - } - - static final _id_mapLibraryName = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"mapLibraryName", - r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public native java.lang.String mapLibraryName(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString mapLibraryName( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_mapLibraryName, - jni.JniCallType.objectType, [string.reference]).object); - } -} - -class $SystemType extends jni.JObjType { - const $SystemType(); - - @override - String get signature => r"Ljava/lang/System;"; - - @override - System fromRef(jni.JObjectPtr ref) => System.fromRef(ref); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($SystemType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($SystemType) && other is $SystemType; - } -} diff --git a/pkgs/java_http/lib/src/third_party/java/lang/_package.dart b/pkgs/java_http/lib/src/third_party/java/lang/_package.dart deleted file mode 100644 index b468ec065d..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/lang/_package.dart +++ /dev/null @@ -1 +0,0 @@ -export "System.dart"; diff --git a/pkgs/java_http/lib/src/third_party/java/net/HttpURLConnection.dart b/pkgs/java_http/lib/src/third_party/java/net/HttpURLConnection.dart deleted file mode 100644 index ba1954b02d..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/net/HttpURLConnection.dart +++ /dev/null @@ -1,523 +0,0 @@ -// 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 $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"", r"(Ljava/net/URL;)V"); - - /// from: protected void (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 { - 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; - } -} diff --git a/pkgs/java_http/lib/src/third_party/java/net/URL.dart b/pkgs/java_http/lib/src/third_party/java/net/URL.dart deleted file mode 100644 index 3c6e5e6ba6..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/net/URL.dart +++ /dev/null @@ -1,403 +0,0 @@ -// 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 "../io/InputStream.dart" as inputstream_; - -/// from: java.net.URL -class URL extends jni.JObject { - @override - late final jni.JObjType $type = type; - - URL.fromRef( - jni.JObjectPtr ref, - ) : super.fromRef(ref); - - static final _class = jni.Jni.findJClass(r"java/net/URL"); - - /// The type which includes information such as the signature of this class. - static const type = $URLType(); - static final _id_ctor = jni.Jni.accessors.getMethodIDOf(_class.reference, - r"", r"(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V"); - - /// from: public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2) - /// The returned object must be deleted after use, by calling the `delete` method. - factory URL( - jni.JString string, - jni.JString string1, - int i, - jni.JString string2, - ) { - return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, _id_ctor, [ - string.reference, - string1.reference, - jni.JValueInt(i), - string2.reference - ]).object); - } - - static final _id_ctor1 = jni.Jni.accessors.getMethodIDOf(_class.reference, - r"", r"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); - - /// from: public void (java.lang.String string, java.lang.String string1, java.lang.String string2) - /// The returned object must be deleted after use, by calling the `delete` method. - factory URL.ctor1( - jni.JString string, - jni.JString string1, - jni.JString string2, - ) { - return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, - _id_ctor1, - [string.reference, string1.reference, string2.reference]).object); - } - - static final _id_ctor2 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"", - r"(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/net/URLStreamHandler;)V"); - - /// from: public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2, java.net.URLStreamHandler uRLStreamHandler) - /// The returned object must be deleted after use, by calling the `delete` method. - factory URL.ctor2( - jni.JString string, - jni.JString string1, - int i, - jni.JString string2, - jni.JObject uRLStreamHandler, - ) { - return URL.fromRef( - jni.Jni.accessors.newObjectWithArgs(_class.reference, _id_ctor2, [ - string.reference, - string1.reference, - jni.JValueInt(i), - string2.reference, - uRLStreamHandler.reference - ]).object); - } - - static final _id_ctor3 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"", r"(Ljava/lang/String;)V"); - - /// from: public void (java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - factory URL.ctor3( - jni.JString string, - ) { - return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, _id_ctor3, [string.reference]).object); - } - - static final _id_ctor4 = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"", r"(Ljava/net/URL;Ljava/lang/String;)V"); - - /// from: public void (java.net.URL uRL, java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - factory URL.ctor4( - URL uRL, - jni.JString string, - ) { - return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, _id_ctor4, [uRL.reference, string.reference]).object); - } - - static final _id_ctor5 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"", - r"(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V"); - - /// from: public void (java.net.URL uRL, java.lang.String string, java.net.URLStreamHandler uRLStreamHandler) - /// The returned object must be deleted after use, by calling the `delete` method. - factory URL.ctor5( - URL uRL, - jni.JString string, - jni.JObject uRLStreamHandler, - ) { - return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, - _id_ctor5, - [uRL.reference, string.reference, uRLStreamHandler.reference]).object); - } - - static final _id_getQuery = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getQuery", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getQuery() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getQuery() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getQuery, jni.JniCallType.objectType, []).object); - } - - static final _id_getPath = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getPath", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getPath() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getPath() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getPath, jni.JniCallType.objectType, []).object); - } - - static final _id_getUserInfo = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getUserInfo", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getUserInfo() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getUserInfo() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getUserInfo, jni.JniCallType.objectType, []).object); - } - - static final _id_getAuthority = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getAuthority", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getAuthority() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getAuthority() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getAuthority, jni.JniCallType.objectType, []).object); - } - - static final _id_getPort = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"getPort", r"()I"); - - /// from: public int getPort() - int getPort() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getPort, jni.JniCallType.intType, []).integer; - } - - static final _id_getDefaultPort = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getDefaultPort", r"()I"); - - /// from: public int getDefaultPort() - int getDefaultPort() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getDefaultPort, jni.JniCallType.intType, []).integer; - } - - static final _id_getProtocol = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getProtocol", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getProtocol() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getProtocol() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getProtocol, jni.JniCallType.objectType, []).object); - } - - static final _id_getHost = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getHost", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getHost() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getHost() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getHost, jni.JniCallType.objectType, []).object); - } - - static final _id_getFile = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getFile", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getFile() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getFile() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getFile, jni.JniCallType.objectType, []).object); - } - - static final _id_getRef = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getRef", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getRef() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getRef() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getRef, jni.JniCallType.objectType, []).object); - } - - static final _id_equals1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"equals", r"(Ljava/lang/Object;)Z"); - - /// from: public boolean equals(java.lang.Object object) - bool equals1( - jni.JObject object, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_equals1, - jni.JniCallType.booleanType, [object.reference]).boolean; - } - - static final _id_hashCode1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"hashCode", r"()I"); - - /// from: public int hashCode() - int hashCode1() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_hashCode1, jni.JniCallType.intType, []).integer; - } - - static final _id_sameFile = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"sameFile", r"(Ljava/net/URL;)Z"); - - /// from: public boolean sameFile(java.net.URL uRL) - bool sameFile( - URL uRL, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_sameFile, - jni.JniCallType.booleanType, [uRL.reference]).boolean; - } - - static final _id_toString1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"toString", r"()Ljava/lang/String;"); - - /// from: public java.lang.String toString() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString toString1() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_toString1, jni.JniCallType.objectType, []).object); - } - - static final _id_toExternalForm = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"toExternalForm", r"()Ljava/lang/String;"); - - /// from: public java.lang.String toExternalForm() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString toExternalForm() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_toExternalForm, jni.JniCallType.objectType, []).object); - } - - static final _id_toURI = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"toURI", r"()Ljava/net/URI;"); - - /// from: public java.net.URI toURI() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject toURI() { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_toURI, jni.JniCallType.objectType, []).object); - } - - static final _id_openConnection = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"openConnection", r"()Ljava/net/URLConnection;"); - - /// from: public java.net.URLConnection openConnection() - /// The returned object must be deleted after use, by calling the `delete` method. - urlconnection_.URLConnection openConnection() { - return const urlconnection_.$URLConnectionType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_openConnection, - jni.JniCallType.objectType, []).object); - } - - static final _id_openConnection1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"openConnection", - r"(Ljava/net/Proxy;)Ljava/net/URLConnection;"); - - /// from: public java.net.URLConnection openConnection(java.net.Proxy proxy) - /// The returned object must be deleted after use, by calling the `delete` method. - urlconnection_.URLConnection openConnection1( - jni.JObject proxy, - ) { - return const urlconnection_.$URLConnectionType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_openConnection1, - jni.JniCallType.objectType, [proxy.reference]).object); - } - - static final _id_openStream = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"openStream", r"()Ljava/io/InputStream;"); - - /// from: public final java.io.InputStream openStream() - /// The returned object must be deleted after use, by calling the `delete` method. - inputstream_.InputStream openStream() { - return const inputstream_.$InputStreamType().fromRef(jni.Jni.accessors - .callMethodWithArgs( - reference, _id_openStream, jni.JniCallType.objectType, []).object); - } - - static final _id_getContent = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getContent", r"()Ljava/lang/Object;"); - - /// from: public final java.lang.Object getContent() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject getContent() { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getContent, jni.JniCallType.objectType, []).object); - } - - static final _id_getContent1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"getContent", - r"([Ljava/lang/Class;)Ljava/lang/Object;"); - - /// from: public final java.lang.Object getContent(java.lang.Object[] classs) - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject getContent1( - jni.JArray classs, - ) { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getContent1, - jni.JniCallType.objectType, - [classs.reference]).object); - } - - static final _id_setURLStreamHandlerFactory = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"setURLStreamHandlerFactory", - r"(Ljava/net/URLStreamHandlerFactory;)V"); - - /// from: static public void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory uRLStreamHandlerFactory) - static void setURLStreamHandlerFactory( - jni.JObject uRLStreamHandlerFactory, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setURLStreamHandlerFactory, - jni.JniCallType.voidType, - [uRLStreamHandlerFactory.reference]).check(); - } -} - -class $URLType extends jni.JObjType { - const $URLType(); - - @override - String get signature => r"Ljava/net/URL;"; - - @override - URL fromRef(jni.JObjectPtr ref) => URL.fromRef(ref); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($URLType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($URLType) && other is $URLType; - } -} diff --git a/pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart b/pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart deleted file mode 100644 index 6dd56e1df9..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart +++ /dev/null @@ -1,836 +0,0 @@ -// 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 "URL.dart" as url_; - -import "../io/InputStream.dart" as inputstream_; - -import "../io/OutputStream.dart" as outputstream_; - -/// from: java.net.URLConnection -class URLConnection extends jni.JObject { - @override - late final jni.JObjType $type = type; - - URLConnection.fromRef( - jni.JObjectPtr ref, - ) : super.fromRef(ref); - - static final _class = jni.Jni.findJClass(r"java/net/URLConnection"); - - /// The type which includes information such as the signature of this class. - static const type = $URLConnectionType(); - static final _id_url = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"url", - r"Ljava/net/URL;", - ); - - /// from: protected java.net.URL url - /// The returned object must be deleted after use, by calling the `delete` method. - url_.URL get url => const url_.$URLType().fromRef(jni.Jni.accessors - .getField(reference, _id_url, jni.JniCallType.objectType) - .object); - - /// from: protected java.net.URL url - /// The returned object must be deleted after use, by calling the `delete` method. - set url(url_.URL value) => - jni.Jni.env.SetObjectField(reference, _id_url, value.reference); - - static final _id_doInput = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"doInput", - r"Z", - ); - - /// from: protected boolean doInput - bool get doInput => jni.Jni.accessors - .getField(reference, _id_doInput, jni.JniCallType.booleanType) - .boolean; - - /// from: protected boolean doInput - set doInput(bool value) => - jni.Jni.env.SetBooleanField(reference, _id_doInput, value ? 1 : 0); - - static final _id_doOutput = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"doOutput", - r"Z", - ); - - /// from: protected boolean doOutput - bool get doOutput => jni.Jni.accessors - .getField(reference, _id_doOutput, jni.JniCallType.booleanType) - .boolean; - - /// from: protected boolean doOutput - set doOutput(bool value) => - jni.Jni.env.SetBooleanField(reference, _id_doOutput, value ? 1 : 0); - - static final _id_allowUserInteraction = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"allowUserInteraction", - r"Z", - ); - - /// from: protected boolean allowUserInteraction - bool get allowUserInteraction => jni.Jni.accessors - .getField( - reference, _id_allowUserInteraction, jni.JniCallType.booleanType) - .boolean; - - /// from: protected boolean allowUserInteraction - set allowUserInteraction(bool value) => jni.Jni.env - .SetBooleanField(reference, _id_allowUserInteraction, value ? 1 : 0); - - static final _id_useCaches = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"useCaches", - r"Z", - ); - - /// from: protected boolean useCaches - bool get useCaches => jni.Jni.accessors - .getField(reference, _id_useCaches, jni.JniCallType.booleanType) - .boolean; - - /// from: protected boolean useCaches - set useCaches(bool value) => - jni.Jni.env.SetBooleanField(reference, _id_useCaches, value ? 1 : 0); - - static final _id_ifModifiedSince = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"ifModifiedSince", - r"J", - ); - - /// from: protected long ifModifiedSince - int get ifModifiedSince => jni.Jni.accessors - .getField(reference, _id_ifModifiedSince, jni.JniCallType.longType) - .long; - - /// from: protected long ifModifiedSince - set ifModifiedSince(int value) => - jni.Jni.env.SetLongField(reference, _id_ifModifiedSince, value); - - static final _id_connected = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"connected", - r"Z", - ); - - /// from: protected boolean connected - bool get connected => jni.Jni.accessors - .getField(reference, _id_connected, jni.JniCallType.booleanType) - .boolean; - - /// from: protected boolean connected - set connected(bool value) => - jni.Jni.env.SetBooleanField(reference, _id_connected, value ? 1 : 0); - - static final _id_getFileNameMap = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"getFileNameMap", r"()Ljava/net/FileNameMap;"); - - /// from: static public java.net.FileNameMap getFileNameMap() - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject getFileNameMap() { - return const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_getFileNameMap, - jni.JniCallType.objectType, []).object); - } - - static final _id_setFileNameMap = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"setFileNameMap", r"(Ljava/net/FileNameMap;)V"); - - /// from: static public void setFileNameMap(java.net.FileNameMap fileNameMap) - static void setFileNameMap( - jni.JObject fileNameMap, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setFileNameMap, - jni.JniCallType.voidType, - [fileNameMap.reference]).check(); - } - - static final _id_connect = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"connect", r"()V"); - - /// from: public abstract void connect() - void connect() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_connect, jni.JniCallType.voidType, []).check(); - } - - static final _id_setConnectTimeout = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setConnectTimeout", r"(I)V"); - - /// from: public void setConnectTimeout(int i) - void setConnectTimeout( - int i, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_setConnectTimeout, - jni.JniCallType.voidType, - [jni.JValueInt(i)]).check(); - } - - static final _id_getConnectTimeout = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getConnectTimeout", r"()I"); - - /// from: public int getConnectTimeout() - int getConnectTimeout() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getConnectTimeout, jni.JniCallType.intType, []).integer; - } - - static final _id_setReadTimeout = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setReadTimeout", r"(I)V"); - - /// from: public void setReadTimeout(int i) - void setReadTimeout( - int i, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_setReadTimeout, - jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); - } - - static final _id_getReadTimeout = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getReadTimeout", r"()I"); - - /// from: public int getReadTimeout() - int getReadTimeout() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getReadTimeout, jni.JniCallType.intType, []).integer; - } - - static final _id_ctor = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"", r"(Ljava/net/URL;)V"); - - /// from: protected void (java.net.URL uRL) - /// The returned object must be deleted after use, by calling the `delete` method. - factory URLConnection( - url_.URL uRL, - ) { - return URLConnection.fromRef(jni.Jni.accessors - .newObjectWithArgs(_class.reference, _id_ctor, [uRL.reference]).object); - } - - static final _id_getURL = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getURL", r"()Ljava/net/URL;"); - - /// from: public java.net.URL getURL() - /// The returned object must be deleted after use, by calling the `delete` method. - url_.URL getURL() { - return const url_.$URLType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getURL, jni.JniCallType.objectType, []).object); - } - - static final _id_getContentLength = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getContentLength", r"()I"); - - /// from: public int getContentLength() - int getContentLength() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getContentLength, jni.JniCallType.intType, []).integer; - } - - static final _id_getContentLengthLong = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getContentLengthLong", r"()J"); - - /// from: public long getContentLengthLong() - int getContentLengthLong() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getContentLengthLong, jni.JniCallType.longType, []).long; - } - - static final _id_getContentType = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getContentType", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getContentType() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getContentType() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getContentType, jni.JniCallType.objectType, []).object); - } - - static final _id_getContentEncoding = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getContentEncoding", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getContentEncoding() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getContentEncoding() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getContentEncoding, - jni.JniCallType.objectType, []).object); - } - - static final _id_getExpiration = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getExpiration", r"()J"); - - /// from: public long getExpiration() - int getExpiration() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getExpiration, jni.JniCallType.longType, []).long; - } - - static final _id_getDate = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"getDate", r"()J"); - - /// from: public long getDate() - int getDate() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getDate, jni.JniCallType.longType, []).long; - } - - static final _id_getLastModified = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getLastModified", r"()J"); - - /// from: public long getLastModified() - int getLastModified() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getLastModified, jni.JniCallType.longType, []).long; - } - - static final _id_getHeaderField = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"getHeaderField", - r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: public java.lang.String getHeaderField(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getHeaderField( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getHeaderField, - jni.JniCallType.objectType, - [string.reference]).object); - } - - static final _id_getHeaderFields = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getHeaderFields", r"()Ljava/util/Map;"); - - /// from: public java.util.Map getHeaderFields() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JMap> getHeaderFields() { - return const jni.JMapType( - jni.JStringType(), jni.JListType(jni.JStringType())) - .fromRef(jni.Jni.accessors.callMethodWithArgs(reference, - _id_getHeaderFields, jni.JniCallType.objectType, []).object); - } - - static final _id_getHeaderFieldInt = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getHeaderFieldInt", r"(Ljava/lang/String;I)I"); - - /// from: public int getHeaderFieldInt(java.lang.String string, int i) - int getHeaderFieldInt( - jni.JString string, - int i, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getHeaderFieldInt, - jni.JniCallType.intType, - [string.reference, jni.JValueInt(i)]).integer; - } - - static final _id_getHeaderFieldLong = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getHeaderFieldLong", r"(Ljava/lang/String;J)J"); - - /// from: public long getHeaderFieldLong(java.lang.String string, long j) - int getHeaderFieldLong( - jni.JString string, - int j, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getHeaderFieldLong, - jni.JniCallType.longType, - [string.reference, j]).long; - } - - 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_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_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_getContent = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getContent", r"()Ljava/lang/Object;"); - - /// from: public java.lang.Object getContent() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject getContent() { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getContent, jni.JniCallType.objectType, []).object); - } - - static final _id_getContent1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"getContent", - r"([Ljava/lang/Class;)Ljava/lang/Object;"); - - /// from: public java.lang.Object getContent(java.lang.Object[] classs) - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject getContent1( - jni.JArray classs, - ) { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getContent1, - jni.JniCallType.objectType, - [classs.reference]).object); - } - - 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_getInputStream = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getInputStream", r"()Ljava/io/InputStream;"); - - /// from: public java.io.InputStream getInputStream() - /// The returned object must be deleted after use, by calling the `delete` method. - inputstream_.InputStream getInputStream() { - return const inputstream_.$InputStreamType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_getInputStream, - jni.JniCallType.objectType, []).object); - } - - static final _id_getOutputStream = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getOutputStream", r"()Ljava/io/OutputStream;"); - - /// from: public java.io.OutputStream getOutputStream() - /// The returned object must be deleted after use, by calling the `delete` method. - outputstream_.OutputStream getOutputStream() { - return const outputstream_.$OutputStreamType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_getOutputStream, - jni.JniCallType.objectType, []).object); - } - - static final _id_toString1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"toString", r"()Ljava/lang/String;"); - - /// from: public java.lang.String toString() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString toString1() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_toString1, jni.JniCallType.objectType, []).object); - } - - static final _id_setDoInput = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"setDoInput", r"(Z)V"); - - /// from: public void setDoInput(boolean z) - void setDoInput( - bool z, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_setDoInput, - jni.JniCallType.voidType, [z ? 1 : 0]).check(); - } - - static final _id_getDoInput = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"getDoInput", r"()Z"); - - /// from: public boolean getDoInput() - bool getDoInput() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getDoInput, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_setDoOutput = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setDoOutput", r"(Z)V"); - - /// from: public void setDoOutput(boolean z) - void setDoOutput( - bool z, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_setDoOutput, - jni.JniCallType.voidType, [z ? 1 : 0]).check(); - } - - static final _id_getDoOutput = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"getDoOutput", r"()Z"); - - /// from: public boolean getDoOutput() - bool getDoOutput() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getDoOutput, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_setAllowUserInteraction = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setAllowUserInteraction", r"(Z)V"); - - /// from: public void setAllowUserInteraction(boolean z) - void setAllowUserInteraction( - bool z, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_setAllowUserInteraction, - jni.JniCallType.voidType, - [z ? 1 : 0]).check(); - } - - static final _id_getAllowUserInteraction = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getAllowUserInteraction", r"()Z"); - - /// from: public boolean getAllowUserInteraction() - bool getAllowUserInteraction() { - return jni.Jni.accessors.callMethodWithArgs(reference, - _id_getAllowUserInteraction, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_setDefaultAllowUserInteraction = jni.Jni.accessors - .getStaticMethodIDOf( - _class.reference, r"setDefaultAllowUserInteraction", r"(Z)V"); - - /// from: static public void setDefaultAllowUserInteraction(boolean z) - static void setDefaultAllowUserInteraction( - bool z, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setDefaultAllowUserInteraction, - jni.JniCallType.voidType, - [z ? 1 : 0]).check(); - } - - static final _id_getDefaultAllowUserInteraction = jni.Jni.accessors - .getStaticMethodIDOf( - _class.reference, r"getDefaultAllowUserInteraction", r"()Z"); - - /// from: static public boolean getDefaultAllowUserInteraction() - static bool getDefaultAllowUserInteraction() { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_getDefaultAllowUserInteraction, - jni.JniCallType.booleanType, []).boolean; - } - - static final _id_setUseCaches = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setUseCaches", r"(Z)V"); - - /// from: public void setUseCaches(boolean z) - void setUseCaches( - bool z, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_setUseCaches, - jni.JniCallType.voidType, [z ? 1 : 0]).check(); - } - - static final _id_getUseCaches = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getUseCaches", r"()Z"); - - /// from: public boolean getUseCaches() - bool getUseCaches() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getUseCaches, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_setIfModifiedSince = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setIfModifiedSince", r"(J)V"); - - /// from: public void setIfModifiedSince(long j) - void setIfModifiedSince( - int j, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, - _id_setIfModifiedSince, jni.JniCallType.voidType, [j]).check(); - } - - static final _id_getIfModifiedSince = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getIfModifiedSince", r"()J"); - - /// from: public long getIfModifiedSince() - int getIfModifiedSince() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getIfModifiedSince, jni.JniCallType.longType, []).long; - } - - static final _id_getDefaultUseCaches = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getDefaultUseCaches", r"()Z"); - - /// from: public boolean getDefaultUseCaches() - bool getDefaultUseCaches() { - return jni.Jni.accessors.callMethodWithArgs(reference, - _id_getDefaultUseCaches, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_setDefaultUseCaches = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setDefaultUseCaches", r"(Z)V"); - - /// from: public void setDefaultUseCaches(boolean z) - void setDefaultUseCaches( - bool z, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, - _id_setDefaultUseCaches, jni.JniCallType.voidType, [z ? 1 : 0]).check(); - } - - static final _id_setDefaultUseCaches1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"setDefaultUseCaches", r"(Ljava/lang/String;Z)V"); - - /// from: static public void setDefaultUseCaches(java.lang.String string, boolean z) - static void setDefaultUseCaches1( - jni.JString string, - bool z, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setDefaultUseCaches1, - jni.JniCallType.voidType, - [string.reference, z ? 1 : 0]).check(); - } - - static final _id_getDefaultUseCaches1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"getDefaultUseCaches", r"(Ljava/lang/String;)Z"); - - /// from: static public boolean getDefaultUseCaches(java.lang.String string) - static bool getDefaultUseCaches1( - jni.JString string, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_getDefaultUseCaches1, - jni.JniCallType.booleanType, - [string.reference]).boolean; - } - - static final _id_setRequestProperty = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"setRequestProperty", - r"(Ljava/lang/String;Ljava/lang/String;)V"); - - /// from: public void setRequestProperty(java.lang.String string, java.lang.String string1) - void setRequestProperty( - jni.JString string, - jni.JString string1, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_setRequestProperty, - jni.JniCallType.voidType, - [string.reference, string1.reference]).check(); - } - - static final _id_addRequestProperty = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"addRequestProperty", - r"(Ljava/lang/String;Ljava/lang/String;)V"); - - /// from: public void addRequestProperty(java.lang.String string, java.lang.String string1) - void addRequestProperty( - jni.JString string, - jni.JString string1, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_addRequestProperty, - jni.JniCallType.voidType, - [string.reference, string1.reference]).check(); - } - - static final _id_getRequestProperty = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"getRequestProperty", - r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: public java.lang.String getRequestProperty(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getRequestProperty( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getRequestProperty, - jni.JniCallType.objectType, - [string.reference]).object); - } - - static final _id_getRequestProperties = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getRequestProperties", r"()Ljava/util/Map;"); - - /// from: public java.util.Map getRequestProperties() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JMap> getRequestProperties() { - return const jni.JMapType( - jni.JStringType(), jni.JListType(jni.JStringType())) - .fromRef(jni.Jni.accessors.callMethodWithArgs(reference, - _id_getRequestProperties, jni.JniCallType.objectType, []).object); - } - - static final _id_setDefaultRequestProperty = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"setDefaultRequestProperty", - r"(Ljava/lang/String;Ljava/lang/String;)V"); - - /// from: static public void setDefaultRequestProperty(java.lang.String string, java.lang.String string1) - static void setDefaultRequestProperty( - jni.JString string, - jni.JString string1, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setDefaultRequestProperty, - jni.JniCallType.voidType, - [string.reference, string1.reference]).check(); - } - - static final _id_getDefaultRequestProperty = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"getDefaultRequestProperty", - r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public java.lang.String getDefaultRequestProperty(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString getDefaultRequestProperty( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_getDefaultRequestProperty, - jni.JniCallType.objectType, - [string.reference]).object); - } - - static final _id_setContentHandlerFactory = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"setContentHandlerFactory", - r"(Ljava/net/ContentHandlerFactory;)V"); - - /// from: static public void setContentHandlerFactory(java.net.ContentHandlerFactory contentHandlerFactory) - static void setContentHandlerFactory( - jni.JObject contentHandlerFactory, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setContentHandlerFactory, - jni.JniCallType.voidType, - [contentHandlerFactory.reference]).check(); - } - - static final _id_guessContentTypeFromName = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"guessContentTypeFromName", - r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public java.lang.String guessContentTypeFromName(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString guessContentTypeFromName( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_guessContentTypeFromName, - jni.JniCallType.objectType, - [string.reference]).object); - } - - static final _id_guessContentTypeFromStream = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"guessContentTypeFromStream", - r"(Ljava/io/InputStream;)Ljava/lang/String;"); - - /// from: static public java.lang.String guessContentTypeFromStream(java.io.InputStream inputStream) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString guessContentTypeFromStream( - inputstream_.InputStream inputStream, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_guessContentTypeFromStream, - jni.JniCallType.objectType, - [inputStream.reference]).object); - } -} - -class $URLConnectionType extends jni.JObjType { - const $URLConnectionType(); - - @override - String get signature => r"Ljava/net/URLConnection;"; - - @override - URLConnection fromRef(jni.JObjectPtr ref) => URLConnection.fromRef(ref); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($URLConnectionType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($URLConnectionType) && - other is $URLConnectionType; - } -} diff --git a/pkgs/java_http/lib/src/third_party/java/net/_package.dart b/pkgs/java_http/lib/src/third_party/java/net/_package.dart deleted file mode 100644 index f52baa0ff1..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/net/_package.dart +++ /dev/null @@ -1,3 +0,0 @@ -export "HttpURLConnection.dart"; -export "URL.dart"; -export "URLConnection.dart"; diff --git a/pkgs/java_http/pubspec.yaml b/pkgs/java_http/pubspec.yaml deleted file mode 100644 index 129bc08e47..0000000000 --- a/pkgs/java_http/pubspec.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: java_http -version: 0.0.1 -description: >- - A Dart package for making HTTP requests using java.net.HttpURLConnection. -repository: https://github.com/dart-lang/http/tree/master/pkgs/java_http - -publish_to: none - -environment: - sdk: ^3.0.0 - -dependencies: - async: ^2.11.0 - http: '>=0.13.4 <2.0.0' - jni: ^0.5.0 - path: ^1.8.0 - -dev_dependencies: - dart_flutter_team_lints: ^3.0.0 - http_client_conformance_tests: - path: ../http_client_conformance_tests/ - jnigen: ^0.5.0 - test: ^1.21.0 diff --git a/pkgs/java_http/test/java_client_test.dart b/pkgs/java_http/test/java_client_test.dart deleted file mode 100644 index c6e769ca6f..0000000000 --- a/pkgs/java_http/test/java_client_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; -import 'package:java_http/java_http.dart'; -import 'package:test/test.dart'; - -void main() { - group('java_http client conformance tests', () { - testIsolate(JavaClient.new); - testResponseBody(JavaClient()); - testResponseBodyStreamed(JavaClient()); - testResponseHeaders(JavaClient()); - testResponseStatusLine(JavaClient()); - testRequestBody(JavaClient()); - testRequestHeaders(JavaClient()); - testMultipleClients(JavaClient.new); - }); -}