- All Implemented Interfaces:
Serializable,Comparable<InputFormat>,Constable
How the text of an
Input is written.- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionComma-separated values with a header row naming the columns, read as acsv("…")source reads a file: RFC 4180 quoting, an empty field a NULL, a row that ends early refused.One JSON array of objects, each object a row.One JSON object per line — JSON lines, NDJSON — each a row.Tab-separated values with a header row. -
Method Summary
Modifier and TypeMethodDescriptionstatic InputFormatReturns the enum constant of this class with the specified name.static InputFormat[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CSV
Comma-separated values with a header row naming the columns, read as acsv("…")source reads a file: RFC 4180 quoting, an empty field a NULL, a row that ends early refused. -
TSV
Tab-separated values with a header row. A field holds no tab or line break; a backslash escapes one (\t,\n,\r,\\). -
JSON
One JSON array of objects, each object a row. Read whole, so it cannot stream. -
NDJSON
One JSON object per line — JSON lines, NDJSON — each a row. The streaming form of JSON, and whatjq -cwrites.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-