long trueDataSize(){
  if (!isValidHeader()) {
    return 0L;
  }
  int naxis=getIntValue(NAXIS,0);
  if (naxis == 0) {
    return 0L;
  }
  getIntValue(BITPIX);
  int[] axes=new int[naxis];
  for (int axis=1; axis <= naxis; axis+=1) {
    axes[axis - 1]=getIntValue(NAXISn.n(axis),0);
  }
  boolean isGroup=getBooleanValue(GROUPS,false);
  int pcount=getIntValue(PCOUNT,0);
  int gcount=getIntValue(GCOUNT,1);
  int startAxis=0;
  if (isGroup && naxis > 1 && axes[0] == 0) {
    startAxis=1;
  }
  long size=1;
  for (int i=startAxis; i < naxis; i+=1) {
    size*=axes[i];
  }
  size+=pcount;
  size*=gcount;
  size*=Math.abs(getIntValue(BITPIX,0)) / FitsIO.BITS_OF_1_BYTE;
  return size;
}

long trueDataSize ( ) { if ( ! isValidHeader ( ) ) { return 0L ; } int naxis = getIntValue ( NAXIS , 0 ) ; if ( naxis == 0 ) { return 0L ; } getIntValue ( BITPIX ) ; int [ ] axes = new int [ naxis ] ; for ( int axis = 1 ; axis <= naxis ; axis += 1 ) { axes [ axis - 1 ] = getIntValue ( NAXISn . n ( axis ) , 0 ) ; } boolean isGroup = getBooleanValue ( GROUPS , false ) ; int pcount = getIntValue ( PCOUNT , 0 ) ; int gcount = getIntValue ( GCOUNT , 1 ) ; int startAxis = 0 ; if ( isGroup && naxis > 1 && axes [ 0 ] == 0 ) { startAxis = 1 ; } long size = 1 ; for ( int i = startAxis ; i < naxis ; i += 1 ) { size *= axes [ i ] ; } size += pcount ; size *= gcount ; size *= Math . abs ( getIntValue ( BITPIX , 0 ) ) / FitsIO . BITS_OF_1_BYTE ; return size ; }
calculate the unpadded size of the data segment from the header information .
