List of utility methods to do InputStream to OutputStream
void | copyStream(InputStream in, File outputFile) Copies the content from in into outputFile. OutputStream os = new FileOutputStream(outputFile); try { copyStreamUnsafelyUseWithCaution(in, os); } finally { os.close(); |
void | copyStream(InputStream in, FileOutputStream out, IProgressMonitor monitor, int length) copy Stream byte[] data = new byte[4096]; int count = in.read(data); while (count != -1) { out.write(data, 0, count); if (length != -1) { monitor.worked(count); count = in.read(data); ... |
void | copyStream(InputStream in, OutputStream os) Copies the content from in into os. byte[] buf = new byte[1024]; int len; while ((len = in.read(buf)) > 0) { os.write(buf, 0, len); |
String | copyStream(InputStream in, OutputStream os) Simple copy a stream with a buffer of 1024 bytes into an outputstream. byte[] buf = new byte[1024]; int len; while ((len = in.read(buf)) > 0) { os.write(buf, 0, len); os.flush(); if (os instanceof ByteArrayOutputStream) { return new String(((ByteArrayOutputStream) os).toByteArray(), "UTF-8"); ... |
long | copyStream(InputStream in, OutputStream out) copy Stream return copyStream(in, out, new byte[8192]); |
void | copyStream(InputStream in, OutputStream out) copy Stream while (true) { int read = in.read(BUFFER); if (read < 0) break; out.write(BUFFER, 0, read); |
long | copyStream(InputStream in, OutputStream out) copy Stream return copyStream(in, out, 10240);
|
long | copyStream(InputStream in, OutputStream out) Copies data from an InputStream to an OutputStream. return copyStream(in, out, new byte[BUFFER_SIZE]); |
void | copyStream(InputStream in, OutputStream out) Copy stream. try { copyStreamNoClose(in, out); } finally { safeClose(in); safeClose(out); |
int | copyStream(InputStream in, OutputStream out) DOCUMENT ME! int result = 0; byte[] buf = new byte[8 * 1024]; for (;;) { int numRead = in.read(buf); if (numRead == -1) { break; out.write(buf, 0, numRead); ... |