Class IoStreamUtils

java.lang.Object
org.projecthusky.common.utils.IoStreamUtils

@DefaultQualifier(value=org.checkerframework.checker.nullness.qual.NonNull.class, locations={PARAMETER,RETURN}) public class IoStreamUtils extends Object
Helper utilities related to I/O streams.
Author:
Quentin Ligier
  • Method Details

    • calculateSize

      public static long calculateSize(InputStream inputStream) throws IOException
      Calculates the size of a stream.
      Parameters:
      inputStream - The stream to measure.
      Returns:
      the size of the stream.
      Throws:
      IOException - if the InputStream is unreadable.