Enum Constant and Description |
---|
MAC
MAC up to version 9 uses CR.
|
UNIX
Unix (and Linux) are using LF.
|
WINDOWS
Windows uses CR+LF.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
convertNewlines(java.lang.String input)
Converts the input string to using the specified line breaks and returns
the result.
|
java.lang.String |
getNewline()
Returns character(s) used to represent newline.
|
static ENewline |
guessNewline(java.lang.String string)
Attempts to guess the newline style from a string.
|
static ENewline |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ENewline[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static ENewline[] values()
for (ENewline c : ENewline.values()) System.out.println(c);
public static ENewline valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getNewline()
public java.lang.String convertNewlines(java.lang.String input)
public static ENewline guessNewline(java.lang.String string)
StringUtils.LINE_SEPARATOR
is
returned.