Class IOStreams

java.lang.Object
org.monte.media.io.IOStreams

public class IOStreams extends Object
IOStreams.
Author:
Werner Randelshofer
  • Constructor Details

    • IOStreams

      public IOStreams()
  • Method Details

    • copy

      public static void copy(File source, File target) throws IOException
      Copies the source file into the provided target file.
      Parameters:
      source - the source file
      target - the target file
      Throws:
      IOException
    • copy

      public static long copy(InputStream source, OutputStream target) throws IOException
      Copies the remainder of the source stream into the provided target stream.
      Parameters:
      source - the source stream
      target - the target stream
      Returns:
      number of copied bytes
      Throws:
      IOException
    • copy

      public static long copy(InputStream source, ImageOutputStream target) throws IOException
      Copies the remainder of the source stream into the provided target stream.
      Parameters:
      source - the source stream
      target - the target stream
      Returns:
      number of copied bytes
      Throws:
      IOException
    • copy

      public static long copy(InputStream source, ImageOutputStream target, long n) throws IOException
      Copies up to the specified number of bytes from the remainder of the source stream into the provided target stream.
      Parameters:
      source - the source stream
      target - the target stream
      n - the maximal number of bytes to copy
      Returns:
      actual number of copied bytes
      Throws:
      IOException