Class ResourceUtils
java.lang.Object
org.infinispan.protostream.impl.ResourceUtils
- Since:
- 4.3.4
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetContentsAsString(File file) static Stringstatic StringgetContentsAsString(Reader reader) static ReadergetResourceAsReader(Class<?> c, String resourcePath) static InputStreamgetResourceAsStream(ClassLoader userClassLoader, String resourcePath) Returns an input stream for reading the specified resource ornullif the resource could not be found.static StringgetResourceAsString(Class<?> c, String resourcePath)
-
Field Details
-
READ_BUFFER_SIZE
private static final int READ_BUFFER_SIZE- See Also:
-
-
Constructor Details
-
ResourceUtils
private ResourceUtils()
-
-
Method Details
-
getContentsAsString
- Throws:
IOException
-
getContentsAsString
- Throws:
IOException
-
getContentsAsString
- Throws:
IOException
-
getResourceAsStream
Returns an input stream for reading the specified resource ornullif 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
-