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 StringloadCompressedResource(String theClasspath)static <T extends IBaseResource>
TloadResource(FhirContext theCtx, Class<T> theType, String theClasspath)static StringloadResource(String theClasspath)static StringloadResource(String theClasspath, Function<InputStream,InputStream> theStreamTransform)Load a classpath resource, throw anInternalErrorExceptionif not foundstatic byte[]loadResourceAsByteArray(String theClasspath)static InputStreamloadResourceAsStream(String theClasspath)Load a classpath resource, throw anInternalErrorExceptionif not foundstatic Function<InputStream,InputStream>withBom()
-
Method Details
-
loadResource
-
loadResourceAsStream
Load a classpath resource, throw anInternalErrorExceptionif not found- Throws:
InternalErrorException- If the resource can't be found
-
loadResource
@Nonnull public static String loadResource(String theClasspath, Function<InputStream,InputStream> theStreamTransform)Load a classpath resource, throw anInternalErrorExceptionif not found -
loadCompressedResource
-
loadResource
@Nonnull public static <T extends IBaseResource> T loadResource(FhirContext theCtx, Class<T> theType, String theClasspath) -
close
-
withBom
-
loadResourceAsByteArray
-