mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-08 01:26:03 +00:00
added char stream copy.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3903 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
82fe674184
commit
d4304e19e4
1 file changed
+9
@@ -15,6 +15,8 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.Reader;
|
||||
import java.io.Writer;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.security.DigestInputStream;
|
||||
@@ -248,6 +250,13 @@ public class Util {
|
||||
out.write(buf,0,len);
|
||||
}
|
||||
|
||||
public static void copyStream(Reader in, Writer out) throws IOException {
|
||||
char[] buf = new char[8192];
|
||||
int len;
|
||||
while((len=in.read(buf))>0)
|
||||
out.write(buf,0,len);
|
||||
}
|
||||
|
||||
public static String[] tokenize(String s) {
|
||||
StringTokenizer st = new StringTokenizer(s);
|
||||
String[] a = new String[st.countTokens()];
|
||||
|
||||
Reference in new issue
Block a user