An emulation of some of the classes in the java.net package. More may be added in the future, while many such as java.net.SocketServer
will never make any sense within a browser.
Source code were copied from the Apache Harmony project with numerous patches made
to ensure the behaviour of both the JRE and the emulated class are identical. The java.net.URL
required some patches
to handle several edge cases, such as handling of missing components, such as an empty host. Tests
are provided to verify both do the same thing with the same parameters.
- MalformedURLException
- URI
- URL
- URLDecoder
- URLEncoder
The java.net.URLStreamHandler
is absent as one of its primary functionalities is to handle connectivity to a resource
on a network.
- The package
walkingkooka.j2cl.java.net
is shaded tojava.net
.
URL should only be used to parse java.lang.String
. All network connectivity and interaction methods have been removed.
Customization depending on the protocol portion of a URL via a java.net.URLStreamHandler
is not possible and all methods
with it have been removed.
java.net.URLStreamHandler
ctor methods are absentgetContent
absent.openConnection
absent.openStream
absent.setURLStreamHandlerFactory
absent.