Java File Save save(InputStream is, OutputStream os)

Here you can find the source of save(InputStream is, OutputStream os)

Description

save

License

Open Source License

Declaration

static void save(InputStream is, OutputStream os) throws IOException 

Method Source Code

//package com.java2s;

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

public class Main {
    static void save(InputStream is, OutputStream os) throws IOException {
        byte[] inbuf = new byte[1024];
        do {/* w w  w  .  j  a v  a  2 s.  c  o  m*/
            int nCount = is.read(inbuf);
            if (nCount > 0) {
                os.write(inbuf, 0, nCount);
            }
        } while (is.available() > 0);
    }
}

Related

  1. save(OutputStream out, InputStream iStream)
  2. saveBytesAsIfile(final IFile file, final byte[] bytes)
  3. saveContent(OutputStream os, byte[] content)
  4. saveConvert(String theString, boolean escapeSpace)