|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.marketcetera.orderloader.OrderParser
public class OrderParser
Processes a CSV file and generates trade objects from it.
| Field Summary | |
|---|---|
static String |
COMMENT_MARKER
|
| Constructor Summary | |
|---|---|
OrderParser(RowProcessor inProcessor)
Creates a parser instance that parses the orders and processes them using the supplied delegate. |
|
| Method Summary | |
|---|---|
int |
getNumBlankLines()
Returns the total number of blank lines. |
int |
getNumComments()
Returns the total number of lines with comments. |
int |
getNumLines()
Returns the total number of lines processed. |
void |
parseOrders(InputStream inStream)
Parses rows out of the supplied file and uses the processors to process them. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String COMMENT_MARKER
| Constructor Detail |
|---|
public OrderParser(RowProcessor inProcessor)
inProcessor - the delegate to use for creating orders from
each row and processing them. Cannot be null| Method Detail |
|---|
public int getNumLines()
public int getNumBlankLines()
public int getNumComments()
public void parseOrders(InputStream inStream)
throws IOException,
OrderParsingException
inStream - the input stream with csv input containing orders.
The stream is closed when this method returns.
IOException - if there was an error opening the supplied file or
if the file had no orders to send.
OrderParsingException - if the file didn't have the
column headers specified correctly or if the file didn't have any orders.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||