提交 570e3e6b 编写于 作者: K kohsuke

added another convenience method.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@32396 71c3de6d-444a-0410-be80-ed276b4c234a
上级 66b9d9ba
......@@ -14,6 +14,14 @@ import java.io.OutputStream;
* @since 1.337
*/
public class IOUtils extends org.apache.commons.io.IOUtils {
/**
* Drains the input stream and closes it.
*/
public static void drain(InputStream in) throws IOException {
copy(in,new NullStream());
in.close();
}
public static void copy(File src, OutputStream out) throws IOException {
FileInputStream in = new FileInputStream(src);
try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册