Package com.amazon.ion.system
Enum IonTextWriterBuilder.NewLineType
- java.lang.Object
-
- java.lang.Enum<IonTextWriterBuilder.NewLineType>
-
- com.amazon.ion.system.IonTextWriterBuilder.NewLineType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<IonTextWriterBuilder.NewLineType>
- Enclosing class:
- IonTextWriterBuilder
public static enum IonTextWriterBuilder.NewLineType extends java.lang.Enum<IonTextWriterBuilder.NewLineType>
Represents common new-line separators that are valid in Ion. Unicode defines several characters that can represent a new line, but only carriage return (CR) and linefeed (LF) are valid whitespace in Ion. Using other new-line characters (such asNEL) will result in printing invalid Ion.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CRLFA carriage return and linefeed (U+000Dfollowed byU+000A).LFA single linefeed (U+000A).PLATFORM_DEPENDENTThe new-line separator specified in the "line.separator" system property.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.CharSequencegetCharSequence()static IonTextWriterBuilder.NewLineTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static IonTextWriterBuilder.NewLineType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CRLF
public static final IonTextWriterBuilder.NewLineType CRLF
A carriage return and linefeed (U+000Dfollowed byU+000A).
-
LF
public static final IonTextWriterBuilder.NewLineType LF
A single linefeed (U+000A).
-
PLATFORM_DEPENDENT
public static final IonTextWriterBuilder.NewLineType PLATFORM_DEPENDENT
The new-line separator specified in the "line.separator" system property. Using this will result in writing invalid Ion if the platform uses anything other than CR and/or LF as the line separator and the IonTextWriter is configured to use pretty printing or to write each top-level value on a separate line.
-
-
Method Detail
-
values
public static IonTextWriterBuilder.NewLineType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (IonTextWriterBuilder.NewLineType c : IonTextWriterBuilder.NewLineType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IonTextWriterBuilder.NewLineType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getCharSequence
public java.lang.CharSequence getCharSequence()
-
-