Package com.google.appengine.spi
Class ServicesFile
- java.lang.Object
-
- com.google.appengine.spi.ServicesFile
-
public class ServicesFile extends Object
A helper class for reading and writing Services files.- See Also:
ServiceLoader
-
-
Field Summary
Fields Modifier and Type Field Description static String
SERVICES_PATH
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getPath(String serviceName)
Returns an absolute path to a service file given the class name of the service.static Set<String>
readServiceFile(InputStream input)
Reads the set of service classes from a service file.static void
writeServiceFile(Collection<String> services, OutputStream output)
Writes the set of service class names to a service file.
-
-
-
Field Detail
-
SERVICES_PATH
public static final String SERVICES_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPath
public static String getPath(String serviceName)
Returns an absolute path to a service file given the class name of the service.- Parameters:
serviceName
- notnull
- Returns:
- SERVICES_PATH + serviceName
-
readServiceFile
public static Set<String> readServiceFile(InputStream input) throws IOException
Reads the set of service classes from a service file.- Parameters:
input
- notnull
. Closed after use.- Returns:
- a not
null Set
of service class names. - Throws:
IOException
-
writeServiceFile
public static void writeServiceFile(Collection<String> services, OutputStream output) throws IOException
Writes the set of service class names to a service file.- Parameters:
output
- notnull
. Not closed after use.services
- a notnull Collection
of service class names.- Throws:
IOException
-
-