Package org.pipservices3.expressions.csv
Class CsvQuoteState
- java.lang.Object
-
- org.pipservices3.expressions.csv.CsvQuoteState
-
- All Implemented Interfaces:
IQuoteState,ITokenizerState
public class CsvQuoteState extends Object implements IQuoteState
-
-
Constructor Summary
Constructors Constructor Description CsvQuoteState()
-
Method Summary
Modifier and Type Method Description StringdecodeString(String value, int quoteSymbol)Decodes a string value.StringencodeString(String value, int quoteSymbol)Encodes a string value.TokennextToken(IScanner scanner, ITokenizer tokenizer)Gets the next token from the stream started from the character linked to this state.
-
-
-
Method Detail
-
nextToken
public Token nextToken(IScanner scanner, ITokenizer tokenizer) throws Exception
Gets the next token from the stream started from the character linked to this state.- Specified by:
nextTokenin interfaceITokenizerState- Parameters:
scanner- A textual string to be tokenized.tokenizer- A tokenizer class that controls the process.- Returns:
- The next token from the top of the stream.
- Throws:
Exception
-
encodeString
public String encodeString(String value, int quoteSymbol)
Encodes a string value.- Specified by:
encodeStringin interfaceIQuoteState- Parameters:
value- A string value to be encoded.quoteSymbol- A string quote character.- Returns:
- An encoded string.
-
decodeString
public String decodeString(String value, int quoteSymbol)
Decodes a string value.- Specified by:
decodeStringin interfaceIQuoteState- Parameters:
value- A string value to be decoded.quoteSymbol- A string quote character.- Returns:
- A decoded string.
-
-