# Class TamFitsUtil

java.lang.Object
uk.ac.starlink.datanode.factory.TamFitsUtil

public class TamFitsUtil extends Object
Performs operations dependent on the nom.tam.fits library. Methods from this class must ONLY be invoked if `NodeUtil.hasTAMFITS()` returns true, since nom.tam.fits is not guaranteed to be present at runtime.

Since:
  9 Mar 2022
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`TamFitsUtil()`

## Method Summary

Modifier and Type
Method
Description
`static DataNode`
`getFitsDataNode(File file, byte[] magic, uk.ac.starlink.util.DataSource datsrc)`
Attempts to turn a file into a DataNode based on FITS classes.
`static DataNode`
`getFitsStreamDataNode(uk.ac.starlink.util.DataSource datsrc)`
Attempts to turn a data source into a DataNode based on FITS classes.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### TamFitsUtil

public TamFitsUtil()

## Method Details

### getFitsDataNode

public static DataNode getFitsDataNode(File file, byte[] magic, uk.ac.starlink.util.DataSource datsrc) throws IOException, NoSuchDataException
Attempts to turn a file into a DataNode based on FITS classes.

Throws:
  `IOException`
  `NoSuchDataException`

### getFitsStreamDataNode

public static DataNode getFitsStreamDataNode(uk.ac.starlink.util.DataSource datsrc) throws NoSuchDataException
Attempts to turn a data source into a DataNode based on FITS classes.

Throws:
  `NoSuchDataException`