ResourceSvc
Method Summary |
public |
|
public | |
public | |
public | |
public | |
public |
|
public | |
public |
|
public |
|
public |
|
public | |
public | |
public |
|
public |
|
Method Detail |
publicFind a string by full ID. Note that this method differs from getString in that it does not assert if the string cannot be found e.g. "strings.workshop.shell.dialog.file.Title"StringfindString(StringsStringId)
publicGet a formatted string resource from full string ID. e.g. "strings.workshop.shell.dialog.file.error1"Stringformat(StringsStringId,Object[] args)
Related Topics
MessageFormat.format(String, Object[])
publicGet a formatted string resource using same rules as resource pacakage e.g. "strings.Stringformat(Classc,Stringfile,Stringid,Object[] args)
Related Topics
MessageFormat.format(String, Object[])
publicGet an icon by full path.IcongetIcon(StringsImageId)
publicGet an image by full path.ImagegetImage(StringsImageId)
publicObtain an input stream for the given resource.InputStreamgetInputStream(StringsResourcePath)
publicObtain a reader for a given resource. This essentially obtains an input stream and converts it to a Reader. The method calls FileSvc.get().getReaderForStream() which will attempt to determine the correct charset encoding to use. If you wish to use a custom encoding, call getInputStream and use the InputStreamReader class to convert it to a reader.ReadergetReader(StringsResourcePath)
publicGet a resource package given a full path to the properties file (not including '.properties' extension) or a resource directory e.g. "strings.workshop.shell.dialog.file"ResourceSvc.IResourcePkggetResourcePackage(StringsPrefix)
Related Topics
publicGet a resource package given an object and a properties file name (not including '.properties' extension). This method inspects the Object to get a package name and derives the full package name as follows. strings.ResourceSvc.IResourcePkggetResourcePackage(Objecto,Stringfile)
Related Topics
publicGet a resource package given a class and a properties file name (not including '.properties' extension). This method derives the full package name as follows: strings.ResourceSvc.IResourcePkggetResourcePackage(Classc,Stringfile)
Related Topics
publicGet a string by full ID. This method will assert if the string is not found. This will help catch cases where someone has left out a string. If it is possible to not have the string and still have a valid scenario, you should use findString instead. e.g. "strings.workshop.shell.dialog.file.Title"StringgetString(StringsStringId)
publicGet a string using the class and properties file name This method derives the full package name as follows: strings.<PACKAGE>.file.idStringgetString(Classc,Stringfile,Stringid)
publicConverts all instances of '\n' to operating-system specific line endings. It is the callers responsibility to ensure that the string provided has been correctly normalized.StringtoOSSeparators(Stringstr)
publicConverts all newlines to operating-system specific line endings. If the normalize flag is set, the text will be normalized first.StringtoOSSeparators(Stringstr, boolean normalizeFirst)