Enum 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 as NEL) will result in printing invalid Ion.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CRLF
      A carriage return and linefeed (U+000D followed by U+000A).
      LF
      A single linefeed (U+000A).
      PLATFORM_DEPENDENT
      The new-line separator specified in the "line.separator" system property.
    • Enum Constant Detail

      • 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 name
        java.lang.NullPointerException - if the argument is null
      • getCharSequence

        public java.lang.CharSequence getCharSequence()