简体   繁体   中英

Why does Android have its own URI implementation and doesn't use the default Java implementation?

While working with Android applications, I've often run into converting between Android's Uri class and Java's URI class?

I haven't understood why Android needed its own implementation and didn't use the default URI class that ships with Java?

Maybe I have only been scratching the surface when working with URIs and haven't figured it out. Thanks.

Javadoc says

In the interest of performance, this class performs little to no validation. Behavior is undefined for invalid input. This class is very forgiving--in the face of invalid input, it will return garbage rather than throw an exception unless otherwise specified.

That is definitely different from the JDK one. Maybe that's why?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM