public class ServicesFileA 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 |
Stringnot |
| 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 |
InputStreamnot |
| 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 |
OutputStreamnot |
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|