URLStreamHandlerFactory interface in Java

java.net.URLStreamHandlerFactory

This interface defines a factory for URL stream protocol handlers.

A URL stream handler factory is used as specified in the URL constructor.

Declaration

public interface URLStreamHandlerFactory {
   
    URLStreamHandler createURLStreamHandler(String protocol);
}


Methods

1. URLStreamHandlerFactory.createURLStreamHandler(String protocol)

URLStreamHandler java.net.URLStreamHandlerFactory.createURLStreamHandler(String protocol)

This method takes one argument. This method creates a new URLStreamHandler instance with the specified protocol.

Parameters: One parameter is required for this method.

protocol: the protocol ("ftp", "http", "nntp", etc.).

Returns: a URLStreamHandler for the specific protocol, or null if this factory cannot create a handler for the specific protocol.

Exceptions: NA

No comments:

Post a Comment