Android InputStream Copy copy(InputStream in, BufferedOutputStream out)

Here you can find the source of copy(InputStream in, BufferedOutputStream out)

Description

Copy.

Parameter

Parameter Description
in the in
out the out

Exception

Parameter Description
IOException Signals that an I/O exception has occurred.

Declaration

private static void copy(InputStream in, BufferedOutputStream out)
        throws IOException 

Method Source Code

//package com.java2s;

import java.io.BufferedOutputStream;

import java.io.IOException;
import java.io.InputStream;

public class Main {
    /**/*w  w  w.  j a va 2  s .  c om*/
     * Copy.
     *
     * @param in the in
     * @param out the out
     * @throws IOException Signals that an I/O exception has occurred.
     */
    private static void copy(InputStream in, BufferedOutputStream out)
            throws IOException {
        int byte_;
        while ((byte_ = in.read()) != -1)
            out.write(byte_);
    }
}

Related

  1. CopyStream(InputStream is, OutputStream os)
  2. copy(InputStream in, OutputStream out)
  3. copy(InputStream in, OutputStream out)
  4. copy(InputStream in, OutputStream out)
  5. copy(InputStream input, OutputStream output)