public class ServicesFile
A helper class for reading and writing Services files. See Also: java.util.ServiceLoader
Static Fields
SERVICES_PATH
public static final String SERVICES_PATH
Field Value | |
---|---|
Type | Description |
String |
Static Methods
getPath(String serviceName)
public static String getPath(String serviceName)
Returns an absolute path to a service file given the class name of the service.
Parameter | |
---|---|
Name | Description |
serviceName |
String not |
Returns | |
---|---|
Type | Description |
String |
SERVICES_PATH + serviceName |
readServiceFile(InputStream input)
public static Set<String> readServiceFile(InputStream input)
Reads the set of service classes from a service file.
Parameter | |
---|---|
Name | Description |
input |
InputStream not |
Returns | |
---|---|
Type | Description |
Set<String> |
a not |
Exceptions | |
---|---|
Type | Description |
IOException |
writeServiceFile(Collection<String> services, OutputStream output)
public static void writeServiceFile(Collection<String> services, OutputStream output)
Writes the set of service class names to a service file.
Parameters | |
---|---|
Name | Description |
services |
Collection<String> a not |
output |
OutputStream not |
Exceptions | |
---|---|
Type | Description |
IOException |