code: public static int getRawRdw(byte[] hostData, int start, int length) {
          if (length - start < RDW_LEN) {
              throw new IllegalArgumentException("Not enough bytes for an RDW");
          }
          ByteBuffer buf = ByteBuffer.allocate(RDW_LEN);
          buf.put(0, (byte) 0);
          buf.put(1, (byte) 0);
          buf.put(2, hostData[start + 0]);
          buf.put(3, hostData[start + 1]);
  
          return buf.getInt();
      }
docs: RDW is a 4 bytes numeric where the first 2 bytes are the length of the
  record (LL) including the 4 byte RDW.
  
  @param hostData the mainframe data
  @param start where the RDW starts
  @param length the total size of the mainframe data
  @return the integer content of the RDW