public final class TextOf extends Object implements Text
There is no thread-safety guarantee.
Text.NoNulls
Constructor and Description |
---|
TextOf(byte... bytes)
Ctor.
|
TextOf(Bytes bytes)
Ctor.
|
TextOf(Bytes bytes,
Charset cset)
Ctor.
|
TextOf(Bytes bytes,
String cset)
Ctor.
|
TextOf(char... chars)
Ctor.
|
TextOf(char[] chars,
Charset cset)
Ctor.
|
TextOf(CharSequence builder)
Ctor.
|
TextOf(CharSequence builder,
Charset cset)
Ctor.
|
TextOf(File file)
Ctor.
|
TextOf(Input input)
Ctor.
|
TextOf(Input input,
Charset cset)
Ctor.
|
TextOf(Input input,
int max)
Ctor.
|
TextOf(Input input,
int max,
Charset cset)
Ctor.
|
TextOf(Input input,
String cset)
Ctor.
|
TextOf(Iterable<?> iterable)
Ctor.
|
TextOf(Path path)
Ctor.
|
TextOf(Reader rdr)
Ctor.
|
TextOf(Reader rdr,
Charset cset)
Ctor.
|
TextOf(Reader rdr,
Charset cset,
int max)
Ctor.
|
TextOf(String input)
Ctor.
|
TextOf(String input,
Charset cset)
Ctor.
|
TextOf(Throwable error)
Ctor.
|
TextOf(URI uri)
Ctor.
|
TextOf(URL url)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
String |
asString()
Convert it to the string.
|
int |
compareTo(Text text) |
public TextOf(Input input)
input
- The Inputpublic TextOf(URL url)
url
- The URLpublic TextOf(URI uri)
uri
- The URIpublic TextOf(Path path)
path
- The Inputpublic TextOf(File file)
file
- The Inputpublic TextOf(Input input, int max)
input
- The inputmax
- Max length of the buffer for readingpublic TextOf(Input input, Charset cset)
input
- The Inputcset
- The Charsetpublic TextOf(Input input, String cset)
input
- The Inputcset
- The Charsetpublic TextOf(Input input, int max, Charset cset)
input
- The inputmax
- Max length of the buffer for readingcset
- The Charsetpublic TextOf(Reader rdr)
rdr
- Readerpublic TextOf(Reader rdr, Charset cset, int max)
rdr
- Readercset
- Charsetmax
- Buffer sizepublic TextOf(CharSequence builder)
builder
- The String builderpublic TextOf(CharSequence builder, Charset cset)
builder
- The String buildercset
- The Charsetpublic TextOf(char... chars)
chars
- The charspublic TextOf(char[] chars, Charset cset)
chars
- The charscset
- The charsetpublic TextOf(Throwable error)
error
- The exception to serializepublic TextOf(byte... bytes)
bytes
- The array of bytespublic TextOf(Bytes bytes)
bytes
- The Bytespublic TextOf(Bytes bytes, Charset cset)
bytes
- The Bytescset
- The Charsetpublic TextOf(Bytes bytes, String cset)
bytes
- The Bytescset
- The Charsetpublic TextOf(String input)
input
- The Stringpublic TextOf(String input, Charset cset)
input
- The Stringcset
- The Charsetpublic TextOf(Iterable<?> iterable)
iterable
- The iterable to convert to stringpublic String asString() throws IOException
Text
asString
in interface Text
IOException
- If failspublic int compareTo(Text text)
compareTo
in interface Comparable<Text>
Copyright © 2017 Cactoos. All rights reserved.