| Method from org.apache.catalina.util.IOTools Detail: |
public static void flow(Reader reader,
Writer writer) throws IOException {
char[] buf = new char[DEFAULT_BUFFER_SIZE];
flow( reader, writer, buf );
}
|
public static void flow(InputStream is,
OutputStream os) throws IOException {
byte[] buf = new byte[DEFAULT_BUFFER_SIZE];
flow( is, os, buf );
}
|
public static void flow(Reader reader,
Writer writer,
char[] buf) throws IOException {
int numRead;
while ( (numRead = reader.read(buf) ) >= 0) {
writer.write(buf, 0, numRead);
}
}
Read input from reader and write it to writer until there is no more
input from reader. |
public static void flow(InputStream is,
OutputStream os,
byte[] buf) throws IOException {
int numRead;
while ( (numRead = is.read(buf) ) >= 0) {
os.write(buf, 0, numRead);
}
}
Read input from input stream and write it to output stream
until there is no more input from input stream. |