Where can I get all the details about the protocols we can use in java to make a URL connection.
like : for jar its jar:file:///c|/!/ what does this notaion mean ?
what wd be for let’s say nntp, telnet or ftp kind of protocols. does sun provides any documentation ?
Where can I get all the details about the protocols we can use in
Share
The only thing that is fixed is the specification laid out in RFC3986 (http://tools.ietf.org/html/rfc3986#section-1.1.1) . For the different protocols Java uses differen
java.net.URLStreamHandlers. These are found dynamically at runtimeYou can even register a custom
URLStramHandlerFactoryfor own protocols. The different handlers are chosen dynamically when usingURL.openConnection()Default handlers available in JDK are in sub-packages of
sun.net.www.protocoland classes are named Handler, i.e.sun.net.www.protocol.jar.Handleris for jar protocol andsun.net.www.protocol.mailto.Handleris for mailto.Available protocols are:
For each of the protocols the according RFC specifies the exact URI syntax