Package org.infinispan.protostream.impl
Class ResourceUtils
java.lang.Object
org.infinispan.protostream.impl.ResourceUtils
- Since:
- 4.3.4
- Author:
- [email protected]
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getContentsAsString
(File file) static String
static String
getContentsAsString
(Reader reader) static Reader
getResourceAsReader
(Class<?> c, String resourcePath) static InputStream
getResourceAsStream
(ClassLoader userClassLoader, String resourcePath) Returns an input stream for reading the specified resource ornull
if the resource could not be found.static String
getResourceAsString
(Class<?> c, String resourcePath)
-
Method Details
-
getContentsAsString
- Throws:
IOException
-
getContentsAsString
- Throws:
IOException
-
getContentsAsString
- Throws:
IOException
-
getResourceAsStream
Returns an input stream for reading the specified resource ornull
if the resource could not be found. -
getResourceAsReader
public static Reader getResourceAsReader(Class<?> c, String resourcePath) throws UncheckedIOException - Throws:
UncheckedIOException
-
getResourceAsString
public static String getResourceAsString(Class<?> c, String resourcePath) throws UncheckedIOException - Throws:
UncheckedIOException
- if the resource is not found or an I/O error occurs
-