Enum Class IonTextWriterBuilder.NewLineType

java.lang.Object
java.lang.Enum<IonTextWriterBuilder.NewLineType>
com.amazon.ion.system.IonTextWriterBuilder.NewLineType
All Implemented Interfaces:
Serializable, Comparable<IonTextWriterBuilder.NewLineType>, Constable
Enclosing class:
IonTextWriterBuilder

public static enum IonTextWriterBuilder.NewLineType extends 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 as NEL) will result in printing invalid Ion.
  • Enum Constant Details

    • CRLF

      public static final IonTextWriterBuilder.NewLineType CRLF
      A carriage return and linefeed (U+000D followed by U+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 Details

    • values

      public static IonTextWriterBuilder.NewLineType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IonTextWriterBuilder.NewLineType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getCharSequence

      public CharSequence getCharSequence()