Java InputStream to OutputStream copyStream(InputStream src, OutputStream dest)

Here you can find the source of copyStream(InputStream src, OutputStream dest)

Description

Insert the method's description here.

License

Open Source License

Parameter

Parameter Description
src java.io.File
dest java.io.File

Declaration

public static void copyStream(InputStream src, OutputStream dest) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.*;

public class Main {
    /**/*from  w  w w. j a v  a 2 s. com*/
     * Insert the method's description here.
     * Creation date: (30.01.01 09:22:29)
     * @param src java.io.File
     * @param dest java.io.File
     */
    public static void copyStream(InputStream src, OutputStream dest) throws IOException {
        int c;
        while ((c = src.read()) != -1) {
            dest.write(c);
        }
    }
}

Related

  1. copyStream(InputStream source, OutputStream dest)
  2. copyStream(InputStream source, OutputStream destination, byte[] buffer)
  3. copyStream(InputStream sourceInputStream, OutputStream targetOutputStream)
  4. copyStream(InputStream sourceStream, OutputStream destinationStream)
  5. copyStream(InputStream sourceStream, OutputStream destinationStream, boolean closeInput, boolean closeOutput)
  6. copyStream(InputStream src, OutputStream dest)
  7. copyStream(InputStream src, OutputStream dest, boolean closeStreams, String title)
  8. copyStream(InputStream src, OutputStream osstream)
  9. CopyStream(InputStream sSource, OutputStream sTarget)