Class IOUtils

java.lang.Object
dev.voidframework.core.utils.IOUtils

public final class IOUtils extends Object
IO utility methods.
  • Method Details

    • availableBytes

      public static long availableBytes(InputStream inputStream)
      Retrieves the number of bytes available to be read.
      Parameters:
      inputStream - The input stream
      Returns:
      The number of bytes available to be read
    • closeWithoutException

      public static void closeWithoutException(Closeable closeable)
      Closes the given closeable without any exceptions. This is typically used in finally blocks.
      Parameters:
      closeable - The closeable to close
    • resetWithoutException

      public static void resetWithoutException(InputStream inputStream)
      Reset a stream without any exceptions.
      Parameters:
      inputStream - The input stream to reset