public abstract class IOUtils extends Object
| 构造器和说明 |
|---|
IOUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
closeQuietly(Closeable closeable)
closeQuietly
|
static void |
toFile(InputStream input,
File file)
InputStream to File
|
static String |
toString(InputStream input)
InputStream to String utf-8
|
static String |
toString(InputStream input,
Charset charset)
InputStream to String
|
public static void closeQuietly(Closeable closeable)
closeable - 自动关闭public static String toString(InputStream input) throws IOException
input - the InputStream to read fromNullPointerException - if the input is nullIOException - if an I/O error occurspublic static String toString(InputStream input, Charset charset) throws IOException
input - the InputStream to read fromcharset - the CharsetNullPointerException - if the input is nullIOException - if an I/O error occurspublic static void toFile(InputStream input, File file) throws IOException
input - the InputStream to read fromfile - the File to writeIOException - id异常Copyright © 2017. All rights reserved.