public abstract class StreamUtils extends Object
| 限定符和类型 | 类和说明 |
|---|---|
private static class |
StreamUtils.NonClosingInputStream |
private static class |
StreamUtils.NonClosingOutputStream |
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
BUFFER_SIZE |
private static byte[] |
EMPTY_CONTENT |
| 构造器和说明 |
|---|
StreamUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
copy(byte[] in,
OutputStream out) |
static int |
copy(InputStream in,
OutputStream out) |
static void |
copy(String in,
Charset charset,
OutputStream out) |
static long |
copyRange(InputStream in,
OutputStream out,
long start,
long end) |
static byte[] |
copyToByteArray(InputStream in) |
static String |
copyToString(InputStream in,
Charset charset) |
static int |
drain(InputStream in) |
static InputStream |
emptyInput() |
static InputStream |
nonClosing(InputStream in) |
static OutputStream |
nonClosing(OutputStream out) |
public static final int BUFFER_SIZE
private static final byte[] EMPTY_CONTENT
public static byte[] copyToByteArray(InputStream in) throws IOException
IOExceptionpublic static String copyToString(InputStream in, Charset charset) throws IOException
IOExceptionpublic static void copy(byte[] in,
OutputStream out)
throws IOException
IOExceptionpublic static void copy(String in, Charset charset, OutputStream out) throws IOException
IOExceptionpublic static int copy(InputStream in, OutputStream out) throws IOException
IOExceptionpublic static long copyRange(InputStream in, OutputStream out, long start, long end) throws IOException
IOExceptionpublic static int drain(InputStream in) throws IOException
IOExceptionpublic static InputStream emptyInput()
public static InputStream nonClosing(InputStream in)
public static OutputStream nonClosing(OutputStream out)
Copyright © 2023. All rights reserved.