APIdia Launch Partner
Top Description Inners Constructors Methods
com.sun.tools.jdeprscan

public Class CSV

extends Object
Class Inheritance
Imports
java.io.PrintStream, java.util.ArrayList, .Arrays, .List, java.util.stream.Collectors

Utility class for manipulating comma-separated-value (CSV) data.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum
CSV.State

The CSV parser state.

Constructor Summary

AccessConstructor and Description
public
CSV()

Method Summary

Modifier and TypeMethod and Description
pack-priv static String
quote(String input)

public static List<String>

Returns:

the resulting list of strings
split
(String
the input line
input
)

Splits an input line into a list of strings, handling quoting.

public static void
write(PrintStream
the output destination
out
,
Object...
the objects to write
objs
)

Writes the objects' string representations to the output as a line of CSV.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CSVback to summary
public CSV()

Method Detail

quoteback to summary
pack-priv static String quote(String input)
splitback to summary
public static List<String> split(String input)

Splits an input line into a list of strings, handling quoting.

Parameters
input:String

the input line

Returns:List<String>

the resulting list of strings

writeback to summary
public static void write(PrintStream out, Object... objs)

Writes the objects' string representations to the output as a line of CSV. The objects are converted to String, quoted if necessary, joined with commas, and are written to the output followed by the line separator string.

Parameters
out:PrintStream

the output destination

objs:Object[]

the objects to write

com.sun.tools.jdeprscan back to summary

pack-priv final Enum CSV.State

extends Enum<CSV.State>
Class Inheritance

The CSV parser state.

Field Summary

Modifier and TypeField and Description
public static final CSV.State
public static final CSV.State
public static final CSV.State
public static final CSV.State

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static CSV.State
public static CSV.State[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

END_QFIELDback to summary
public static final CSV.State END_QFIELD
IN_FIELDback to summary
public static final CSV.State IN_FIELD
IN_QFIELDback to summary
public static final CSV.State IN_QFIELD
START_FIELDback to summary
public static final CSV.State START_FIELD

Constructor Detail

Stateback to summary
private State()

Method Detail

valueOfback to summary
public static CSV.State valueOf(String name)
valuesback to summary
public static CSV.State[] values()