public class StreamUtil extends Object
| 构造器和说明 |
|---|
StreamUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static InputStream |
byte2InputStream(byte[] b) |
static byte[] |
inputStream2Byte(InputStream inStream) |
static byte[] |
stream2Byte(InputStream is)
Read an input stream into a byte[]
|
void |
streamSaveAsFile(InputStream is,
File outfile)
将流另存为文件
|
static String |
streamToString(InputStream in)
Read an input stream into a string
|
public static String streamToString(InputStream in) throws IOException
IOExceptionpublic static byte[] stream2Byte(InputStream is) throws IOException
IOExceptionpublic static byte[] inputStream2Byte(InputStream inStream) throws Exception
Exceptionpublic static InputStream byte2InputStream(byte[] b) throws Exception
Exceptionpublic void streamSaveAsFile(InputStream is, File outfile)
Copyright © 2016. All rights reserved.