uk.ac.starlink.gbin
Class GbinMetadataReader

java.lang.Object
  extended by uk.ac.starlink.gbin.GbinMetadataReader

public class GbinMetadataReader
extends java.lang.Object

Provides a utility method for reading metadata from a GBIN file.

Since:
13 Aug 2014

Constructor Summary
GbinMetadataReader()
           
 
Method Summary
static GbinMeta attemptReadMetadata(java.lang.Object gbinReaderObj)
          Attempts to read a metadata object from a GbinReader object.
static void main(java.lang.String[] args)
          Attempts to read metadata from the GBIN file named on the command line and writes the description to stdout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GbinMetadataReader

public GbinMetadataReader()
Method Detail

attemptReadMetadata

public static GbinMeta attemptReadMetadata(java.lang.Object gbinReaderObj)
                                    throws java.lang.Throwable
Attempts to read a metadata object from a GbinReader object.

NOTE: this method is effectively destructive: if you read metadata from a GbinReader you cannot then go on to read data records from it.

A wide range of exceptions and errors may be thrown by this method, since it involves reflection all sorts of things can go wrong.

Parameters:
gbinReaderObj - object implementing gaia.cu1.tools.dal.gbin.GbinReader
Returns:
metadata if possible
Throws:
java.lang.Throwable

main

public static void main(java.lang.String[] args)
                 throws java.lang.Throwable
Attempts to read metadata from the GBIN file named on the command line and writes the description to stdout.

Throws:
java.lang.Throwable

Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved.