public final class ResourceUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getResourceId(String library,
String name) |
static String |
getResourceId(javax.faces.component.UIComponent componentResource) |
static InputStream |
toInputStream(String string,
String encoding)
Converts a String to an
InputStream. |
static String |
toString(InputStream inputStream,
String encoding,
int bufferSize)
Converts an
InputStream to a String. |
public static String getResourceId(javax.faces.component.UIComponent componentResource)
public static InputStream toInputStream(String string, String encoding) throws UnsupportedEncodingException
InputStream.string - encoding - UnsupportedEncodingExceptionpublic static String toString(InputStream inputStream, String encoding, int bufferSize) throws IOException
InputStream to a String.inputStream - The InputStream which contains some text.encoding - The encoding of the text of the InputStream.bufferSize - The size of the character buffer to be used when reading the file. If you do not want to
specify this value, use toInputStream(java.lang.String,
java.lang.String) which provides a default of 1024.IOExceptionCopyright © 2016 Liferay, Inc.. All rights reserved.