public class StringSyntaxBean extends Object implements StringSyntax
StringSyntax as simple Java bean.| Modifier and Type | Field and Description |
|---|---|
private char |
escape |
private char |
quoteEnd |
private char |
quoteStart |
| Constructor and Description |
|---|
StringSyntaxBean()
The constructor.
|
StringSyntaxBean(char escape)
The constructor.
|
StringSyntaxBean(char escape,
char quote)
The constructor.
|
StringSyntaxBean(char escape,
char quoteStart,
char quoteEnd)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
char |
getEscape()
This method gets the character used as escape.
|
char |
getQuoteEnd()
This method gets the character used to end a quotation.
|
char |
getQuoteStart()
This method gets the character used to start a quotation that should be terminated by a
quote-end character. |
void |
setEscape(char escape) |
void |
setQuote(char quote)
This method sets both the
quote-start and quote-end character. |
void |
setQuoteEnd(char quoteEnd) |
void |
setQuoteStart(char quoteStart) |
private char escape
private char quoteStart
private char quoteEnd
public StringSyntaxBean()
public StringSyntaxBean(char escape)
escape - - see getEscape().public StringSyntaxBean(char escape,
char quote)
escape - - see getEscape().quote - - see setQuote(char).public StringSyntaxBean(char escape,
char quoteStart,
char quoteEnd)
escape - - see getEscape().quoteStart - - see getQuoteStart().quoteEnd - - see @getQuoteEnd().public char getEscape()
StringSyntaxStringSyntax.getQuoteStart()
to allow these characters also in the payload. The escape itself is removed on decoding while the next character is
taken as is without any special interpretation. \). escape |
input | output |
|---|---|---|
| \ | a\b\\c | ab\c |
| ~ | a~b~~~c | ab~c |
getEscape in interface StringSyntax'\0' for no escaping.public void setEscape(char escape)
escape - is the escape to set.public char getQuoteStart()
StringSyntaxquote-end character. The text inside the quote is taken as is (without the quote characters). ') and double quotes (").getQuoteStart in interface StringSyntax'\0' to disable.public void setQuoteStart(char quoteStart)
quoteStart - is the quoteStart to set.public char getQuoteEnd()
StringSyntaxgetQuoteEnd in interface StringSyntax'\0' to disable.StringSyntax.getQuoteStart()public void setQuoteEnd(char quoteEnd)
quoteEnd - is the quoteEnd to set.public void setQuote(char quote)
quote-start and quote-end character.quote - the quote character to set.Copyright © 2001–2016 mmm-Team. All rights reserved.