jsyntaxpane.util
public class JarServiceProvider extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SERVICES_ROOT |
Modifier and Type | Method and Description |
---|---|
static java.io.InputStream |
findResource(java.lang.String url)
Attempt to find a location url.
|
static java.io.InputStream |
findResource(java.lang.String url,
java.lang.ClassLoader cl)
Attempt to find a location url.
|
static java.util.List<java.lang.Object> |
getServiceProviders(java.lang.Class cls)
Return an Object array from the file in META-INF/resources/{classname}
|
static java.util.List<java.lang.String> |
readLines(java.lang.String url)
Read the given URL and returns a List of Strings for each input line
Each line will not have the line terminator.
|
static java.util.Properties |
readProperties(java.lang.Class clazz)
Read a file in the META-INF/services location.
|
static java.util.Properties |
readProperties(java.lang.String name)
Read a file in the META-INF/services named name appended with
".properties"
If no file is found, then a an empty Property instance will be returned
|
static java.util.Properties |
readProperties(java.lang.String name,
java.util.Locale locale)
Read language specific files in the META-INF/services named name appended
with ".properties".
|
static java.util.Map<java.lang.String,java.lang.String> |
readStringsMap(java.lang.String name)
Read a file in the META-INF/services named name appended with
".properties", and returns it as a
Map
If no file is found, then a an empty Property instance will be returned |
public static final java.lang.String SERVICES_ROOT
public static java.util.List<java.lang.Object> getServiceProviders(java.lang.Class cls) throws java.io.IOException
cls
- java.io.IOException
public static java.util.Properties readProperties(java.lang.Class clazz)
clazz
- public static java.util.Properties readProperties(java.lang.String name)
name
- name of file (use dots to separate subfolders).public static java.util.Properties readProperties(java.lang.String name, java.util.Locale locale)
name
- name of file (use dots to separate subfolders).locale
- The locale for which to read the filespublic static java.util.Map<java.lang.String,java.lang.String> readStringsMap(java.lang.String name)
Map
If no file is found, then a an empty Property instance will be returnedname
- name of file (use dots to separate subfolders).public static java.util.List<java.lang.String> readLines(java.lang.String url)
url
- location of file to readpublic static java.io.InputStream findResource(java.lang.String url, java.lang.ClassLoader cl)
url
- cl
- classloaderfindResource(java.lang.String)
public static java.io.InputStream findResource(java.lang.String url)
url
- findResource(java.lang.String, java.lang.ClassLoader)