public class StringWritableCsv
extends java.lang.Object
StringWritable
sConstructor and Description |
---|
StringWritableCsv() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
parseFrom(java.lang.String value)
Parse a String with a
StringWritableCsv into its composing Strings
represented as Strings. |
static java.lang.String[] |
parseFrom(java.lang.String value,
int n)
Parse a String with a
StringWritableCsv into its composing Strings
represented as Strings. |
static java.lang.String[] |
parseFrom(java.lang.String value,
int n,
int offset)
Parse a String with a
StringWritableCsv into its composing Strings
represented as Strings. |
private static void |
writeStringWritableToStringBuffer(StringWritable value,
java.lang.StringBuffer sb) |
static java.lang.StringBuffer |
writeTo(java.lang.StringBuffer sb,
StringWritable... values)
Write a sequence of
StringWritableCsv s to a StringBuffer. |
private static void writeStringWritableToStringBuffer(StringWritable value, java.lang.StringBuffer sb)
public static java.lang.StringBuffer writeTo(java.lang.StringBuffer sb, StringWritable... values) throws java.lang.IllegalArgumentException
StringWritableCsv
s to a StringBuffer.
Null StringWritable
s are not printed, but separator is still used.
Separator is a comma (',')sb
- The sb to write tovalues
- Zero or more attribute-value pairs to writejava.lang.IllegalArgumentException
- If sb is nullpublic static java.lang.String[] parseFrom(java.lang.String value, int n, int offset) throws java.lang.IllegalArgumentException
StringWritableCsv
into its composing Strings
represented as Strings. No validation is performed on the individual attribute-values returned.value
- The String with the set of attribute-valuesn
- Number of entries to return (entries will be null of there were not enough). 0 means unlimitedoffset
- How many entries to skip before start returningjava.lang.IllegalArgumentException
- If value is null or either n or offset are negativepublic static java.lang.String[] parseFrom(java.lang.String value, int n) throws java.lang.IllegalArgumentException
StringWritableCsv
into its composing Strings
represented as Strings. No validation is performed on the individual attribute-values returned.
Elements are returned starting from the first available attribute-value.value
- The String with the set of attribute-valuesn
- Number of entries to return (entries will be null of there were not enough). 0 means unlimitedjava.lang.IllegalArgumentException
- If value is null or n is negativepublic static java.lang.String[] parseFrom(java.lang.String value) throws java.lang.IllegalArgumentException
StringWritableCsv
into its composing Strings
represented as Strings. No validation is performed on the individual attribute-values returned.
All the available attribute-values will be returned.value
- The String with the set of attribute-valuesjava.lang.IllegalArgumentException
- If value is null