Package ca.uhn.fhir.util
Class ClasspathUtil
- java.lang.Object
-
- ca.uhn.fhir.util.ClasspathUtil
-
public class ClasspathUtil extends Object
Use this API with caution, it may change!
-
-
Constructor Summary
Constructors Constructor Description ClasspathUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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()
-
-
-
Constructor Detail
-
ClasspathUtil
public ClasspathUtil()
-
-
Method Detail
-
loadResource
public static String loadResource(String theClasspath)
-
loadResourceAsStream
@Nonnull public static InputStream loadResourceAsStream(String theClasspath)
Load a classpath resource, throw anInternalErrorExceptionif not found
-
loadResource
@Nonnull public static String loadResource(String theClasspath, Function<InputStream,InputStream> theStreamTransform)
Load a classpath resource, throw anInternalErrorExceptionif not found
-
loadCompressedResource
@Nonnull public static String loadCompressedResource(String theClasspath)
-
loadResource
@Nonnull public static <T extends IBaseResource> T loadResource(FhirContext theCtx, Class<T> theType, String theClasspath)
-
close
public static void close(InputStream theInput)
-
withBom
public static Function<InputStream,InputStream> withBom()
-
loadResourceAsByteArray
public static byte[] loadResourceAsByteArray(String theClasspath)
-
-