Class IOUtil

java.lang.Object
org.krysalis.barcode4j.tools.IOUtil

public class IOUtil extends Object
Utility functions for I/O operations.
  • Constructor Details

    • IOUtil

      public IOUtil()
  • Method Details

    • copy

      public static void copy(InputStream in, OutputStream out) throws IOException
      Copies the contents of an InputStream to an OutputStream.
      Parameters:
      in - the input stream
      out - the output stream
      Throws:
      IOException - if an I/O error occurs
    • closeQuietly

      public static void closeQuietly(InputStream in)
      Closes an InputStream. It ignores any exceptions happening while closing the stream.
      Parameters:
      in - the input stream
    • closeQuietly

      public static void closeQuietly(Reader reader)
      Closes a Reader. It ignores any exceptions happening while closing the stream.
      Parameters:
      reader - the reader