public class StreamUtil extends Object
StreamUtil class.
| Constructor and Description |
|---|
StreamUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyStream(InputStream is,
OutputStream out)
copyStream.
|
static void |
read(InputStream is,
ByteBuffer buf,
int bytes)
read.
|
static byte[] |
readFully(InputStream is)
Reads entire resource from an input stream
|
static void |
readFully(InputStream is,
byte[] b)
readFully.
|
static void |
readFully(InputStream is,
byte[] b,
int off,
int len)
readFully.
|
static void |
readFully(InputStream is,
ByteBuffer buf)
readFully.
|
public static void copyStream(InputStream is, OutputStream out) throws IOException
copyStream.
is - a InputStream object.out - a OutputStream object.IOException - if any.public static void read(InputStream is, ByteBuffer buf, int bytes) throws IOException
read.
is - a InputStream object.buf - a ByteBuffer object.bytes - a int.IOException - if any.public static byte[] readFully(InputStream is) throws IOException
is - a InputStream object.IOException - if any.public static void readFully(InputStream is, byte[] b) throws IOException
readFully.
is - a InputStream object.b - an array of byte.IOException - if any.public static void readFully(InputStream is, byte[] b, int off, int len) throws IOException
readFully.
is - a InputStream object.b - an array of byte.off - a int.len - a int.IOException - if any.public static void readFully(InputStream is, ByteBuffer buf) throws IOException
readFully.
is - a InputStream object.buf - a ByteBuffer object.IOException - if any.Copyright © 2026. All rights reserved.