public static void copyThenClose(InputStream input, OutputStream output)
      throws IOException {
    copy(input, output);
    input.close();
    output.close();
  }
public static void copyThenClose ( InputStream input , OutputStream output ) throws IOException { copy ( input , output ) ; input . close ( ) ; output . close ( ) ; }
Copies information between specified streams and then closes
both of the streams.
@throws java.io.IOException