Package ca.uhn.fhir.util
Class ClasspathUtil
java.lang.Object
ca.uhn.fhir.util.ClasspathUtil
Use this API with caution, it may change!
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
close
(InputStream theInput) static <T extends IBaseResource>
TloadCompressedResource
(FhirContext theCtx, Class<T> theType, String theClasspath) Load a classpath resource, throw anInternalErrorException
if not foundstatic String
loadCompressedResource
(String theClasspath) static <T extends IBaseResource>
TloadResource
(FhirContext theCtx, Class<T> theType, String theClasspath) static String
loadResource
(String theClasspath) Load a classpath resource, throw anInternalErrorException
if not foundstatic String
loadResource
(String theClasspath, Function<InputStream, InputStream> theStreamTransform) Load a classpath resource, throw anInternalErrorException
if not foundstatic byte[]
loadResourceAsByteArray
(String theClasspath) static Reader
loadResourceAsReader
(String theClasspath) static InputStream
loadResourceAsStream
(String theClasspath) Load a classpath resource, throw anInternalErrorException
if not foundstatic Function
<InputStream, InputStream> withBom()
-
Method Details
-
loadResource
Load a classpath resource, throw anInternalErrorException
if not found- Throws:
InternalErrorException
- If the resource can't be found
-
loadResourceAsStream
@Nonnull public static InputStream loadResourceAsStream(String theClasspath) throws InternalErrorException Load a classpath resource, throw anInternalErrorException
if not found- Throws:
InternalErrorException
- If the resource can't be found
-
loadResourceAsReader
-
loadResource
@Nonnull public static String loadResource(String theClasspath, Function<InputStream, InputStream> theStreamTransform) Load a classpath resource, throw anInternalErrorException
if not found -
loadCompressedResource
-
loadCompressedResource
@Nonnull public static <T extends IBaseResource> T loadCompressedResource(FhirContext theCtx, Class<T> theType, String theClasspath) Load a classpath resource, throw anInternalErrorException
if not found- Since:
- 6.4.0
-
loadResource
@Nonnull public static <T extends IBaseResource> T loadResource(FhirContext theCtx, Class<T> theType, String theClasspath) -
close
-
withBom
-
loadResourceAsByteArray
-