finance.options
Class Options
java.lang.Object
finance.options.Options
public class Options
- extends java.lang.Object
Constructor Summary |
Options(java.lang.String sSymbol)
|
Method Summary |
static java.lang.String |
getMarketData(java.lang.String sSymbol)
Connect to the url and download an HTML page with the data
for example: |
Option[] |
getOptions()
|
static void |
main(java.lang.String[] args)
Runs the program with the symbol aapl |
void |
parseOptionString(java.lang.String bigString)
Convert a CSV bigstring into an array of options, by scanning the CSV
for valid option lines, and building objects from the contents of the line |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Options
public Options(java.lang.String sSymbol)
throws java.io.IOException,
javax.swing.text.BadLocationException
- Throws:
java.io.IOException
javax.swing.text.BadLocationException
getOptions
public Option[] getOptions()
getMarketData
public static java.lang.String getMarketData(java.lang.String sSymbol)
throws java.io.IOException,
javax.swing.text.BadLocationException
- Connect to the url and download an HTML page with the data
for example:
http://marketdata.optionetics.com/custom/optionetics-com/html-qcn.asp?mode=option&symb=aapl
- Parameters:
sSymbol
- The stock symbol to search for
- Returns:
- a single string of the HTML page converted to CSV data
- Throws:
java.io.IOException
javax.swing.text.BadLocationException
parseOptionString
public void parseOptionString(java.lang.String bigString)
throws java.text.ParseException
- Convert a CSV bigstring into an array of options, by scanning the CSV
for valid option lines, and building objects from the contents of the line
- Parameters:
bigString
- a csv bagstring
- Throws:
java.text.ParseException
main
public static void main(java.lang.String[] args)
throws java.io.IOException,
javax.swing.text.BadLocationException,
java.text.ParseException
- Runs the program with the symbol aapl
- Parameters:
args
- the symbol of the company to get; aapl if not specified
- Throws:
java.io.IOException
javax.swing.text.BadLocationException
java.text.ParseException