@Override
 public void checkReference(
     RECORD record,
     DynamicRecord name,
     CheckerEngine<RECORD, REPORT> engine,
     RecordAccess records) {
   if (!name.inUse()) {
     nameNotInUse(engine.report(), name);
   } else {
     if (name.getLength() <= 0) {
       emptyName(engine.report(), name);
     }
   }
 }
Esempio n. 2
0
 void writeDynamicRecord(DynamicRecord record) throws IOException {
   // id+type+in_use(byte)+nr_of_bytes(int)+next_block(long)
   if (record.inUse()) {
     byte inUse = Record.IN_USE.byteValue();
     if (record.isStartRecord()) {
       inUse |= Record.FIRST_IN_CHAIN.byteValue();
     }
     channel
         .putLong(record.getId())
         .putInt(record.getType())
         .put(inUse)
         .putInt(record.getLength())
         .putLong(record.getNextBlock());
     byte[] data = record.getData();
     assert data != null;
     channel.put(data, data.length);
   } else {
     byte inUse = Record.NOT_IN_USE.byteValue();
     channel.putLong(record.getId()).putInt(record.getType()).put(inUse);
   }
 }