@PublicEvolving public class StringValueParser extends FieldParser<StringValue>
StringValue. The byte contents between
delimiters is interpreted as an ASCII string. The string may be quoted in double quotes. For quoted
strings, whitespaces (space and tab) leading and trailing before and after the quotes are removed.StringValueFieldParser.ParseErrorState| Constructor and Description |
|---|
StringValueParser() |
| Modifier and Type | Method and Description |
|---|---|
StringValue |
createValue()
Returns an instance of the parsed value type.
|
void |
enableQuotedStringParsing(byte quoteCharacter) |
StringValue |
getLastResult()
Gets the parsed field.
|
int |
parseField(byte[] bytes,
int startPos,
int limit,
byte[] delimiter,
StringValue reusable)
Each parser's logic should be implemented inside this method
|
delimiterNext, getErrorState, getParserForType, resetErrorStateAndParse, resetParserState, setErrorStatepublic void enableQuotedStringParsing(byte quoteCharacter)
public int parseField(byte[] bytes,
int startPos,
int limit,
byte[] delimiter,
StringValue reusable)
FieldParserparseField in class FieldParser<StringValue>FieldParser#parseField(byte[], int, int, byte[], Object)}public StringValue createValue()
FieldParsercreateValue in class FieldParser<StringValue>public StringValue getLastResult()
FieldParserFieldParser.parseField(byte[], int, int, byte[], Object). It objects are mutable and reused, it will return
the object instance that was passed the parse function.getLastResult in class FieldParser<StringValue>Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.