code: public TimephasedCostContainer getBaselineCost(ProjectCalendar calendar, TimephasedCostNormaliser normaliser, byte[] data, boolean raw)
     {
        TimephasedCostContainer result = null;
  
        if (data != null && data.length > 0)
        {
           LinkedList<TimephasedCost> list = null;
  
           //System.out.println(ByteArrayHelper.hexdump(data, false));
           int index = 16; // 16 byte header
           int blockSize = 20;
           double previousTotalCost = 0;
  
           Date blockStartDate = MPPUtility.getTimestampFromTenths(data, index + 16);
           index += blockSize;
  
           while (index + blockSize <= data.length)
           {
              Date blockEndDate = MPPUtility.getTimestampFromTenths(data, index + 16);
              double currentTotalCost = (double) ((long) MPPUtility.getDouble(data, index + 8)) / 100;
              if (!costEquals(previousTotalCost, currentTotalCost))
              {
                 TimephasedCost cost = new TimephasedCost();
                 cost.setStart(blockStartDate);
                 cost.setFinish(blockEndDate);
                 cost.setTotalAmount(Double.valueOf(currentTotalCost - previousTotalCost));
  
                 if (list == null)
                 {
                    list = new LinkedList<TimephasedCost>();
                 }
                 list.add(cost);
                 //System.out.println(cost);
  
                 previousTotalCost = currentTotalCost;
              }
  
              blockStartDate = blockEndDate;
              index += blockSize;
           }
  
           if (list != null)
           {
              result = new DefaultTimephasedCostContainer(calendar, normaliser, list, raw);
           }
        }
  
        return result;
     }
docs: Extracts baseline cost from the MPP file for a specific baseline.
  Returns null if no baseline cost is present, otherwise returns
  a list of timephased work items.
  
  @param calendar baseline calendar
  @param normaliser normaliser associated with this data
  @param data timephased baseline work data block
  @param raw flag indicating if this data is to be treated as raw
  @return timephased work