net.spy.info
Class Stocks

java.lang.Object
  extended bynet.spy.info.Stocks

public class Stocks
extends Object

Get stock quotes.


Constructor Summary
Stocks()
          Get a stock quote gettin' object.
 
Method Summary
 StockQuote getQuote(String symbol)
          Get a StockQuote for a given symbol.
 Map getQuotes(String[] symbols)
          Get multiple stock quotes given an array of ticker symbols.
static void main(String[] args)
          Test program, call it with ticker symbols on the commandline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stocks

public Stocks()
Get a stock quote gettin' object.

Method Detail

getQuote

public StockQuote getQuote(String symbol)
                    throws Exception
Get a StockQuote for a given symbol.

Parameters:
symbol - which stock to look up.
Throws:
Exception - when a lookup fails.

getQuotes

public Map getQuotes(String[] symbols)
              throws Exception
Get multiple stock quotes given an array of ticker symbols.

Parameters:
symbols - list of symbols to look up
Throws:
Exception - when there's a problem looking up symbols

main

public static void main(String[] args)
                 throws Exception
Test program, call it with ticker symbols on the commandline.

Throws:
Exception - when something goes terribly wrong.