public final class BytesAsText extends Object implements Text
This class is doing something similar to what ExceptionUtils are doing from Apache Commons.
There is no thread-safety guarantee.
Constructor and Description |
---|
BytesAsText(byte[] bts)
Ctor.
|
BytesAsText(byte[] bts,
Charset cset)
Ctor.
|
BytesAsText(Bytes bts)
Ctor.
|
BytesAsText(Bytes bts,
Charset cset)
Ctor.
|
public BytesAsText(byte[] bts)
bts
- Bytes to encapsulatepublic BytesAsText(Bytes bts)
bts
- Bytes to encapsulatepublic BytesAsText(byte[] bts, Charset cset)
bts
- Bytes to encapsulatecset
- Charsetpublic String asString() throws IOException
Text
asString
in interface Text
IOException
- If failsCopyright © 2017 Cactoos. All rights reserved.