List of utility methods to do InputStream to OutputStream
void | copyStream(InputStream is, OutputStream os) Copy data from an InputStream to an OutputStream. copyStream(is, os, false); |
void | copyStream(InputStream is, OutputStream os) Copy a stream, using a buffer copyStream(is, os, new byte[BUFSIZ]); |
void | copyStream(InputStream is, OutputStream os) Copy the data read from the specified input stream to the specified output stream. byte[] bytes = new byte[TEMP_BUFFER_SIZE]; while (true) { int n = is.read(bytes); if (n <= 0) break; os.write(bytes, 0, n); |
long | copyStream(InputStream is, OutputStream os) Copy contents of one stream onto another return copyStream(is, os, 8192);
|
void | copyStream(InputStream is, OutputStream os) Copies data. copyStream(is, os, 1024); |
void | CopyStream(InputStream is, OutputStream os) Copy Stream final int buffer_size = 1024; try { byte[] bytes = new byte[buffer_size]; for (;;) { int count = is.read(bytes, 0, buffer_size); if (count == -1) break; os.write(bytes, 0, count); ... |
void | copyStream(InputStream is, OutputStream os) copy Stream try { final int bufSize = 4096; byte[] buf = new byte[bufSize]; int cnt = 0; while ((cnt = is.read(buf)) > 0) { os.write(buf, 0, cnt); } catch (IOException ex) { ... |
void | copyStream(InputStream is, OutputStream os, boolean closeInput) copy Stream try { byte[] bytes = new byte[4096]; int numBytes; while ((numBytes = is.read(bytes)) != -1) { os.write(bytes, 0, numBytes); } finally { if (closeInput) { ... |
void | copyStream(InputStream is, OutputStream os, int bufferSize) Copy input stream to output stream without closing streams. assert is != null : "input stream is null"; assert os != null : "output stream is null"; byte[] buff = new byte[bufferSize]; int rc; while ((rc = is.read(buff)) != -1) os.write(buff, 0, rc); os.flush(); |
void | copyStream(InputStream is, OutputStream os, long maxLength) copy Stream try { final int bufSize = 4096; byte[] buf = new byte[bufSize]; int cnt = 0; while ((cnt = is.read(buf)) > 0) { os.write(buf, 0, cnt); maxLength -= cnt; if (maxLength < bufSize) { ... |