Interface ResourceUtils
public interface ResourceUtils
-
Field Summary
Fields -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic booleancloseMany(AutoCloseable... resources) static booleancloseResource(Closeable closeable) static booleancloseResource(AutoCloseable resource) static voidconsume(OutputStream os, byte[] data) static <E extends Exception>
byte[]getByteArray(org.apache.commons.lang3.function.FailableConsumer<ByteArrayOutputStream, ? extends Exception> function, BiFunction<String, Exception, E> exception) static <E extends Exception>
byte[]getByteArray(org.apache.commons.lang3.function.FailableConsumer<ByteArrayOutputStream, ? extends Exception> function, BiFunction<String, Exception, E> exception, String message) obtainFromCloseable(org.apache.commons.lang3.function.FailableFunction<InputStream, T, E> function, InputStream inputStream) static booleanopenResource(InputStream inputStream) static InputStreamstatic byte[]writeMany(byte[]... data)
-
Field Details
-
CLOSING_ERROR
- See Also:
-
-
Method Details
-
closeMany
-
closeResource
-
closeResource
-
openResource
-
signerPoliciesInformation
- Throws:
IOException
-
obtainFromCloseable
static <T, E extends Exception> Optional<T> obtainFromCloseable(org.apache.commons.lang3.function.FailableFunction<InputStream, T, E> function, InputStream inputStream) -
getByteArray
static <E extends Exception> byte[] getByteArray(org.apache.commons.lang3.function.FailableConsumer<ByteArrayOutputStream, ? extends Exception> function, BiFunction<String, Exception, E> exception) throws E - Throws:
E
-
getByteArray
static <E extends Exception> byte[] getByteArray(org.apache.commons.lang3.function.FailableConsumer<ByteArrayOutputStream, ? extends Exception> function, BiFunction<String, Exception, E> exception, String message) throws E - Throws:
E
-
consume
-
writeMany
static byte[] writeMany(byte[]... data)
-