code: private List<DbHistory> convertPropertyHistory(String[] ret, boolean isAttribute)
              throws DevFailed {
          ArrayList<DbHistory> list = new ArrayList<DbHistory>();
          int i = 0;
          int count = 0;
          int offset;
          String aName = "";
          String pName;
          String pDate;
          String pCount;
  
          while (i<ret.length) {
              if (isAttribute) {
                  aName = ret[i];
                  pName = ret[i + 1];
                  pDate = ret[i + 2];
                  pCount = ret[i + 3];
                  offset = 4;
              } else {
                  pName = ret[i];
                  pDate = ret[i + 1];
                  pCount = ret[i + 2];
                  offset = 3;
              }
  
              try {
                  count = Integer.parseInt(pCount);
              } catch (NumberFormatException e) {
                  Except.throw_exception("TangoApi_HistoryInvalid", "History format is invalid");
              }
              String[] value = new String[count];
              System.arraycopy(ret, i + offset, value, 0, count);
  
              if (isAttribute)
                  list.add(new DbHistory(aName, pName, pDate, value));
              else
                  list.add(new DbHistory(pName, pDate, value));
              i += (count + offset);
          }
          return list;
      }
docs: ==========================================================================