com.github.sd4324530.fastweixin.util
类 StreamUtil

java.lang.Object
  继承者 com.github.sd4324530.fastweixin.util.StreamUtil

public final class StreamUtil
extends Object

套接字工具类

作者:
peiyu

方法摘要
static void closeWithWarn(Closeable closeable)
          关闭需要关闭的对象,如果关闭出错,给出警告
static int copy(InputStream in, OutputStream out)
          将输入流的内容复制到输出流里
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

方法详细信息

copy

public static int copy(InputStream in,
                       OutputStream out)
                throws IOException
将输入流的内容复制到输出流里

参数:
in - 输入流
out - 输出流
返回:
复制的数据字节数
抛出:
IOException - IO异常

closeWithWarn

public static void closeWithWarn(Closeable closeable)
关闭需要关闭的对象,如果关闭出错,给出警告

参数:
closeable - 需要关闭的对象


Copyright © 2017. All rights reserved.