public class RdcDelim
extends java.lang.Object
| Constructor and Description |
|---|
RdcDelim()
Create an instance of a string parser for delimited fields.
|
| Modifier and Type | Method and Description |
|---|---|
void |
computeFields(java.lang.StringBuffer stringIn)
Parse the entire input string
|
void |
computeFields(java.lang.StringBuffer stringIn,
int firstCol,
int length)
Determine the fields for an input string "stringIn" starting at the specified first column
(starting at zero) and ending after length characters.
|
java.lang.StringBuffer |
fieldContent(int ixField)
Pass-through for old calls
|
int |
firstCol(int ixField)
Returns the first character position in the input string for field ixField, both
position and field start at zero.
|
int |
getCountOfFields()
Returns the number of fields that were found.
|
java.lang.StringBuffer |
getFieldContent(int ixField)
Returns the stringBuffer content from input string for field ixField where ixField
starts at zero.
|
char |
getFieldSeparator(int ixField)
Returns the char separator that separated field ixField from the next field.
|
java.lang.String |
getSeps()
Returns the string of character(s) that are used to parse for fields.
|
java.lang.String |
getSepsQuote()
Returns the string of character(s) that will be used to determine a string contained
within quotes that will not be parsed.
|
int |
lastCol(int ixField)
Returns the last character position in the input string for field ixField, both
position and field start at zero.
|
int |
lengthField(int ixField)
Returns the number of characters found in field ixField (0 through nfields-1).
|
static void |
main(java.lang.String[] args) |
void |
printFields() |
void |
rdcFields(java.lang.StringBuffer stringIn,
int firstCol,
int length)
Pass-through for old convention
|
void |
reset()
Reset the RdcDelim Vector to be empty - it won't contain any elements.
|
int |
setSeps(java.lang.String theSeps)
Set the field separator character(s) and returns the number of characters that were set.
|
int |
setSepsQuote(java.lang.String theSepsQ)
Set the string of character(s) that will be used to determine a string contained within
quotes that will not be parsed.
|
int |
size()
Returns the number of fields that were found.
|
public RdcDelim()
public void reset()
public int setSeps(java.lang.String theSeps)
public java.lang.String getSeps()
public int setSepsQuote(java.lang.String theSepsQ)
public java.lang.String getSepsQuote()
public int getCountOfFields()
public int size()
public int lengthField(int ixField)
public int firstCol(int ixField)
public int lastCol(int ixField)
public java.lang.StringBuffer fieldContent(int ixField)
public java.lang.StringBuffer getFieldContent(int ixField)
public char getFieldSeparator(int ixField)
ixField - The field whose separator is wanted.public void rdcFields(java.lang.StringBuffer stringIn,
int firstCol,
int length)
public void computeFields(java.lang.StringBuffer stringIn)
public void computeFields(java.lang.StringBuffer stringIn,
int firstCol,
int length)
public void printFields()
public static void main(java.lang.String[] args)