code: private static int getRecordLen(byte[] hostData, int start, int length) {
  
          int len = getRawRdw(hostData, start, length);
          if (len < RDW_LEN || len > hostData.length) {
              throw new IllegalArgumentException(
                      "Record does not start with a Record Descriptor Word");
          }
          /* Beware that raw rdw accounts for the rdw length (4 bytes) */
          return len - RDW_LEN;
      }
docs: RDW is a 4 bytes numeric stored in Big Endian as a binary 2's complement.
  
  @param hostData the mainframe data
  @param start where the RDW starts
  @param length the total size of the mainframe data
  @return the size of the record (actual data without the rdw itself)