Ask Your Question
1

How do Java.Net.Uri and Android.Net.Uri differ from each other?

asked 2021-12-01 11:00:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-01-06 21:00:00 +0000

scrum gravatar image

Java.Net.URI and Android.Net.Uri are both classes that represent Uniform Resource Identifiers (URIs). However, they differ in the following ways:

  1. Packages: Java.Net.URI is part of the Java standard library, while Android.Net.Uri is part of the Android SDK.

  2. Constructors: Java.Net.URI has three constructors, while Android.Net.Uri has several overloaded constructors that allow for more flexibility.

  3. Parsing: Android.Net.Uri has built-in support for parsing URIs that reference Android app resources, whereas Java.Net.URI does not.

  4. Methods: Android.Net.Uri has several additional methods that are specific to Android, such as getEncodedPath() and parseToUri(). Java.Net.URI does not have these methods.

  5. Compatibility: Java.Net.URI is compatible with all Java platforms, while Android.Net.Uri is specific to the Android platform.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-12-01 11:00:00 +0000

Seen: 8 times

Last updated: Jan 06 '23