
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 voidclose(InputStream theInput) static <T extends IBaseResource>
TloadCompressedResource(FhirContext theCtx, Class<T> theType, String theClasspath) Load a classpath resource, throw anInternalErrorExceptionif not foundstatic StringloadCompressedResource(String theClasspath) static <T extends IBaseResource>
TloadResource(FhirContext theCtx, Class<T> theType, String theClasspath) static StringloadResource(String theClasspath) Load a classpath resource, throw anInternalErrorExceptionif not foundstatic StringloadResource(String theClasspath, Function<InputStream, InputStream> theStreamTransform) Load a classpath resource, throw anInternalErrorExceptionif not foundstatic byte[]loadResourceAsByteArray(String theClasspath) static ReaderloadResourceAsReader(String theClasspath) static InputStreamloadResourceAsStream(String theClasspath) Load a classpath resource, throw anInternalErrorExceptionif not foundstatic Function<InputStream, InputStream> withBom()
-
Method Details
-
loadResource
Load a classpath resource, throw anInternalErrorExceptionif 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 anInternalErrorExceptionif 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 anInternalErrorExceptionif not found -
loadCompressedResource
-
loadCompressedResource
@Nonnull public static <T extends IBaseResource> T loadCompressedResource(FhirContext theCtx, Class<T> theType, String theClasspath) Load a classpath resource, throw anInternalErrorExceptionif 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
-