edu.nrao.sss.astronomy
Class JplEphemerisTableReader

java.lang.Object
  extended by edu.nrao.sss.astronomy.JplEphemerisTableReader
All Implemented Interfaces:
EphemerisTableReader

public class JplEphemerisTableReader
extends Object
implements EphemerisTableReader

A reader of JPL Horizons Ephemeris Tables. An instance of this class may be obtained from the factory that creates ephemeris tables by using the code "JPL".

Requirements for Successful Reading

Example
This is a portion of a table that is readable:

  ...
  RA format       : DEG
  Time format     : CAL 
  ...
  2006-May-07 17:50     23 02 15.2288 -06 59 14.999 20.5170849503044 -25.7582836
  2006-May-07 18:00     23 02 15.2799 -06 59 14.697 20.5169816409424 -25.7597799
  2006-May-07 18:10     23 02 15.3309 -06 59 14.395 20.5168783255799 -25.7612759
  2006-May-07 18:20     23 02 15.3819 -06 59 14.093 20.5167750042186 -25.7627715
  ...
 
A full JPL file can be found here.

Version Info:

$Revision: 762 $
$Date: 2007-07-09 09:08:38 -0600 (Mon, 09 Jul 2007) $
$Author: dharland $

Since:
2006-06-12
Author:
David M. Harland

Method Summary
 EphemerisTable read(InputStream in)
          Creates an ephemeris table from the data found in the given input stream.
 EphemerisTable read(InputStream in, EphemerisTable destination)
          Appends the data found in the given stream to destination and returns it.
 EphemerisTable read(String fileName)
          Creates an ephemeris table from the data found in the given file.
 EphemerisTable read(String fileName, EphemerisTable destination)
          Appends the data found in the given file to destination and returns it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

read

public EphemerisTable read(String fileName)
                    throws IOException
Description copied from interface: EphemerisTableReader
Creates an ephemeris table from the data found in the given file.

Specified by:
read in interface EphemerisTableReader
Parameters:
fileName - the name of the file that has the ephemeris data.
Returns:
a new ephemeris table based on the data in the given file.
Throws:
IOException - if anything does wrong while reading the file.

read

public EphemerisTable read(String fileName,
                           EphemerisTable destination)
                    throws IOException
Description copied from interface: EphemerisTableReader
Appends the data found in the given file to destination and returns it. If destination is null, a new table is created, filled, and returned.

Specified by:
read in interface EphemerisTableReader
Parameters:
fileName - the name of the file that has the ephemeris data.
Returns:
destination, or a new table if destination is null, with the data from fileName appended to it.
Throws:
IOException - if anything does wrong while reading the file.

read

public EphemerisTable read(InputStream in)
                    throws IOException
Description copied from interface: EphemerisTableReader
Creates an ephemeris table from the data found in the given input stream.

Specified by:
read in interface EphemerisTableReader
Parameters:
in - a stream that contains ephemeris data.
Returns:
a new ephemeris table based on the data in the given stream.
Throws:
IOException - if anything does wrong while reading the stream.

read

public EphemerisTable read(InputStream in,
                           EphemerisTable destination)
                    throws IOException
Description copied from interface: EphemerisTableReader
Appends the data found in the given stream to destination and returns it. If destination is null, a new table is created, filled, and returned.

Specified by:
read in interface EphemerisTableReader
Parameters:
in - a stream that contains ephemeris data.
Returns:
destination, or a new table if destination is null, with the data from in appended to it.
Throws:
IOException - if anything does wrong while reading the file.


Copyright © 2009. All Rights Reserved.