public class ClientLocalizationMessageResource extends VirtualResource
UTF8
Constructor and Description |
---|
ClientLocalizationMessageResource() |
Modifier and Type | Method and Description |
---|---|
Resource |
forLocale(Locale locale)
Returns a localized version of the resource.
|
String |
getFile()
Returns the file portion of the Resource path, everything that follows the final forward slash.
|
String |
getPath()
Return the path (the combination of folder and file).
|
InputStream |
openStream()
Opens a stream to the content of the resource, or returns null if the resource does not exist.
|
URL |
toURL()
Returns the URL for the resource, or null if it does not exist.
|
Resource |
withExtension(String extension)
Returns a new Resource with the extension changed (or, if the resource does not have an extension, the extension
is added).
|
exists, forFile, getFolder, isVirtual, toInputStream, toInputStream
public ClientLocalizationMessageResource()
public Resource withExtension(String extension)
Resource
Resource.toURL()
may return null.withExtension
in interface Resource
withExtension
in class VirtualResource
extension
- to apply to the resource, such as "html" or "properties"public String getPath()
Resource
getPath
in interface Resource
getPath
in class VirtualResource
public String getFile()
Resource
getFile
in interface Resource
getFile
in class VirtualResource
public URL toURL()
Resource
toURL
in interface Resource
toURL
in class VirtualResource
public Resource forLocale(Locale locale)
Resource
forLocale
in interface Resource
forLocale
in class VirtualResource
public InputStream openStream() throws IOException
Resource
BufferedInputStream
.IOException
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.