   isPrimary: -> return @primary
   isExtension: -> return @extension
 
+class DataUnit
+  
+  constructor: ->
+    @dataunit = {}
+
+class HDU
+
+  constructor: (header, dataunit)->
+    @header   = header
+    @dataunit = dataunit
+
 class File
   @LINEWIDTH   = 80
   @BLOCKLENGTH = 2880

  @stringPattern = /'(.*)'\s*\/*(.*)/
  @principalMandatoryKeywords = ['BITPIX', 'NAXIS', 'END']
  @extensionKeywords = ['BITPIX', 'NAXIS', 'PCOUNT', 'GCOUNT']

  constructor: ->
    # e.g. [index, value, comment]

    @view       = new jDataView buffer, undefined, undefined, false
    @headers    = []
    @dataunits  = []
    @hdus       = []

    @headerNext = true
    @eof        = false

    @readHeader() while @headerNext
    # loop
    #   @readHeader() while @headerNext
    #   @readDataUnit()
    #   break if @eof

  # ##Class Methods

