public class IOUtils
extends java.lang.Object
Constructor and Description |
---|
IOUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
toStringFromReader(Reader reader)
Converts the reader contents to a string.
|
static java.lang.String |
toStringFromUtf8Bytes(byte[] utf8Bytes)
Convert the byte array, assumed to be UTF-8 character data, to a string.
|
static java.lang.String |
toStringFromUtf8Bytes(byte[] utf8Bytes,
int position,
int length)
Convert the subset of the byte array, from position through position + length - 1, assumed to be a UTF-8
character data, to a string.
|
static java.lang.String |
toStringFromUtf8Bytes(ByteArrayRange byteArrayRange) |
static java.lang.String |
toStringFromUtf8Stream(InputStream inputStream)
Converts the stream contents, assumed to be a UTF-8 character data, to a string.
|
static ByteArrayRange |
toUtf8BytesFromString(java.lang.String s)
Converts the string to a UTF-8 byte array.
|
public static ByteArrayRange toUtf8BytesFromString(java.lang.String s)
s
- string inputpublic static java.lang.String toStringFromUtf8Bytes(byte[] utf8Bytes)
utf8Bytes
- UTF-8 byte arraypublic static java.lang.String toStringFromUtf8Bytes(byte[] utf8Bytes, int position, int length)
utf8Bytes
- UTF-8 byte arrayposition
- starting position in arraylength
- number of bytes to readpublic static java.lang.String toStringFromUtf8Bytes(ByteArrayRange byteArrayRange)
public static java.lang.String toStringFromUtf8Stream(InputStream inputStream)
inputStream
- input stream, assumed to be UTF-8public static java.lang.String toStringFromReader(Reader reader)
reader
- reader object