Package dev.voidframework.core.utils
Class IOUtils
java.lang.Object
dev.voidframework.core.utils.IOUtils
IO utility methods.
-
Method Summary
Modifier and TypeMethodDescriptionstatic longavailableBytes(InputStream inputStream) Retrieves the number of bytes available to be read.static voidcloseWithoutException(Closeable closeable) Closes the given closeable without any exceptions.static voidresetWithoutException(InputStream inputStream) Reset a stream without any exceptions.
-
Method Details
-
availableBytes
Retrieves the number of bytes available to be read.- Parameters:
inputStream- The input stream- Returns:
- The number of bytes available to be read
-
closeWithoutException
Closes the given closeable without any exceptions. This is typically used in finally blocks.- Parameters:
closeable- The closeable to close
-
resetWithoutException
Reset a stream without any exceptions.- Parameters:
inputStream- The input stream to reset
-