public class Streams extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
EOF
Represents the end-of-file (or stream).
|
| Constructor and Description |
|---|
Streams() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
bytes(InputStream in,
String exmsg) |
static long |
copy(InputStream inputStream,
OutputStream outputStream,
byte[] buffer)
Copies bytes from a
InputStream to an OutputStream using the specified buffer, avoiding
the need for a BufferedInputStream. |
static long |
copy(InputStream in,
OutputStream out,
byte[] buffer,
String exmsg) |
static void |
flush(Flushable... flushables) |
static InputStream |
of(byte[] bytes) |
static InputStream |
of(CharSequence seq) |
static Reader |
reader(byte[] bytes) |
static Reader |
reader(CharSequence seq) |
static Reader |
reader(InputStream in) |
static void |
reset(InputStream in) |
static <V> V |
run(Callable<V> c,
String ioExMsg) |
static void |
write(OutputStream out,
byte[] data,
int offset,
int len,
String exMsg) |
static void |
write(OutputStream out,
byte[] bytes,
String exMsg) |
static void |
writeAndClose(OutputStream out,
byte[] data,
String exMsg) |
public static final int EOF
public static byte[] bytes(InputStream in, String exmsg)
public static InputStream of(byte[] bytes)
public static InputStream of(CharSequence seq)
public static Reader reader(byte[] bytes)
public static Reader reader(InputStream in)
public static Reader reader(CharSequence seq)
public static void flush(Flushable... flushables)
public static long copy(InputStream inputStream, OutputStream outputStream, byte[] buffer) throws IOException
InputStream to an OutputStream using the specified buffer, avoiding
the need for a BufferedInputStream.inputStream - the InputStream to read.outputStream - the OutputStream to write.buffer - the buffer to use for the copyIllegalArgumentException - if the InputStream is null.IllegalArgumentException - if the OutputStream is null.IOException - if an I/O error occurs.public static long copy(InputStream in, OutputStream out, byte[] buffer, String exmsg)
public static void reset(InputStream in)
public static void write(OutputStream out, byte[] bytes, String exMsg)
public static void write(OutputStream out, byte[] data, int offset, int len, String exMsg)
public static void writeAndClose(OutputStream out, byte[] data, String exMsg)
Copyright © 2014–2024 jsonwebtoken.io. All rights reserved.