public final class BytesOf extends Object implements Bytes
Bytes
that encapsulates other sources of data.
There is no thread-safety guarantee.
Bytes.NoNulls
Constructor and Description |
---|
BytesOf(byte... bytes)
Ctor.
|
BytesOf(char... chars)
Ctor.
|
BytesOf(char[] chars,
CharSequence charset)
Ctor.
|
BytesOf(char[] chars,
Charset charset)
Ctor.
|
BytesOf(CharSequence input)
Ctor.
|
BytesOf(CharSequence input,
CharSequence charset)
Ctor.
|
BytesOf(CharSequence input,
Charset charset)
Ctor.
|
BytesOf(File file)
Ctor.
|
BytesOf(Input input)
Ctor.
|
BytesOf(Input input,
int max)
Ctor.
|
BytesOf(InputStream input)
Ctor.
|
BytesOf(Path path)
Ctor.
|
BytesOf(Reader rdr)
Ctor.
|
BytesOf(Reader rdr,
CharSequence charset)
Ctor.
|
BytesOf(Reader rdr,
CharSequence charset,
int max)
Ctor.
|
BytesOf(Reader rdr,
Charset charset)
Ctor.
|
BytesOf(Reader rdr,
Charset charset,
int max)
Ctor.
|
BytesOf(Reader rdr,
int max)
Ctor.
|
BytesOf(StackTraceElement... strace)
Ctor.
|
BytesOf(StackTraceElement[] strace,
CharSequence charset)
Ctor.
|
BytesOf(StackTraceElement[] strace,
Charset charset)
Ctor.
|
BytesOf(Text text)
Ctor.
|
BytesOf(Text text,
CharSequence charset)
Ctor.
|
BytesOf(Text text,
Charset charset)
Ctor.
|
BytesOf(Throwable error)
Ctor.
|
BytesOf(Throwable error,
CharSequence charset)
Ctor.
|
BytesOf(Throwable error,
Charset charset)
Ctor.
|
public BytesOf(Input input)
input
- The inputpublic BytesOf(InputStream input)
input
- The inputpublic BytesOf(File file)
file
- The inputpublic BytesOf(Path path)
path
- The inputpublic BytesOf(Input input, int max)
input
- The inputmax
- Max length of the buffer for readingpublic BytesOf(Reader rdr)
rdr
- Readerpublic BytesOf(Reader rdr, Charset charset)
rdr
- Readercharset
- Charsetpublic BytesOf(Reader rdr, CharSequence charset)
rdr
- Readercharset
- Charsetpublic BytesOf(Reader rdr, Charset charset, int max)
rdr
- Readercharset
- Charsetmax
- Buffer sizepublic BytesOf(Reader rdr, int max)
rdr
- Readermax
- Buffer sizepublic BytesOf(Reader rdr, CharSequence charset, int max)
rdr
- Readercharset
- Charsetmax
- Buffer sizepublic BytesOf(CharSequence input)
input
- The sourcepublic BytesOf(CharSequence input, Charset charset)
input
- The sourcecharset
- The charsetpublic BytesOf(CharSequence input, CharSequence charset)
input
- The sourcecharset
- The charsetpublic BytesOf(char... chars)
chars
- The charspublic BytesOf(char[] chars, Charset charset)
chars
- The charscharset
- The charsetpublic BytesOf(char[] chars, CharSequence charset)
chars
- The charscharset
- The charsetpublic BytesOf(Text text)
text
- The sourcepublic BytesOf(Text text, Charset charset)
text
- The sourcecharset
- The charsetpublic BytesOf(Text text, CharSequence charset)
text
- The sourcecharset
- The charsetpublic BytesOf(Throwable error)
error
- The exception to serializepublic BytesOf(Throwable error, Charset charset)
error
- The exception to serializecharset
- Charsetpublic BytesOf(Throwable error, CharSequence charset)
error
- The exception to serializecharset
- Charsetpublic BytesOf(StackTraceElement... strace)
strace
- The stack tracepublic BytesOf(StackTraceElement[] strace, Charset charset)
strace
- The stack tracecharset
- Charsetpublic BytesOf(StackTraceElement[] strace, CharSequence charset)
strace
- The stack tracecharset
- Charsetpublic BytesOf(byte... bytes)
bytes
- Bytes to encapsulatepublic byte[] asBytes() throws IOException
Bytes
asBytes
in interface Bytes
IOException
- If failsCopyright © 2017–2018 Cactoos. All rights reserved.