public final class WordWrap extends Object
Modifier and Type | Class and Description |
---|---|
static class |
WordWrap.Builder
Provides method chaining for specifying parameters to word wrap.
|
Modifier and Type | Field and Description |
---|---|
static Set<Character> |
SPECIAL_WORD_CHARS_SET_DEFAULT |
Modifier and Type | Method and Description |
---|---|
static WordWrap.Builder |
from(CharSequence text)
Sets the the source to be wrapped and returns a builder to specify more
parameters.
|
static WordWrap.Builder |
from(File file,
Charset charset)
Sets the source to be wrapped and the character set to be used to read it.
|
static WordWrap.Builder |
from(InputStream in,
Charset charset)
Sets the source to be wrapped and the character set to be used to read it.
|
static WordWrap.Builder |
from(Reader reader)
Sets the source to be wrapped and returns a builder to specify more
parameters.
|
static WordWrap.Builder |
fromClasspath(String resource,
Charset charset)
Sets the source to be wrapped as a classpath resource to be read using the
given character set.
|
static WordWrap.Builder |
fromClasspathUtf8(String resource)
Sets the source to be wrapped as a classpath resource which will be read
using the UTF-8 character set.
|
static WordWrap.Builder |
fromUtf8(InputStream in)
Sets the source to be wrapped.
|
public static WordWrap.Builder from(Reader reader)
reader
- source to be wrappedpublic static WordWrap.Builder fromClasspathUtf8(String resource)
resource
- source to be wrapped as a classpath resourcepublic static WordWrap.Builder fromClasspath(String resource, Charset charset)
resource
- classpath resource namecharset
- charset to use for readingpublic static WordWrap.Builder from(CharSequence text)
text
- text to be wrappedpublic static WordWrap.Builder fromUtf8(InputStream in)
in
- source to be wrappedpublic static WordWrap.Builder from(InputStream in, Charset charset)
in
- source to be wrappedcharset
- encodingpublic static WordWrap.Builder from(File file, Charset charset)
file
- file to be readcharset
- charset of the text in the source fileCopyright © 2018–2024. All rights reserved.