code: private final void checkIntegrity () throws InternetSCSIException {
  
          switch (type) {
              case EXTENDED_CDB :
              case EXPECTED_BIDIRECTIONAL_READ_DATA_LENGTH :
                  break;
  
              default :
                  throw new InternetSCSIException("AHS Package is not valid.");
          }
  
          // this field is AHSType independent
          specificField.rewind();
          Utils.isReserved(specificField.get());
  
          switch (type) {
              case EXTENDED_CDB :
                  break;
  
              case EXPECTED_BIDIRECTIONAL_READ_DATA_LENGTH :
                  Utils.isExpected(specificField.limit(), EXPECTED_BIDIRECTIONAL_SPECIFIC_FIELD_LENGTH);
                  Utils.isExpected(length, EXPECTED_BIDIRECTIONAL_LENGTH);
                  break;
  
              default :
                  throw new InternetSCSIException("Unknown additional header segment type.");
          }
  
          specificField.rewind();
      }
docs: This method checks the integrity of the this Additional Header Segment object to garantee a valid specification.
  
  @throws InternetSCSIException If the fields are not valid for this AHS type.