private static ByteBuffer readDedicatedRecordPayloadAsSlice(int dedicatedAttributeRecordId,
                                                              int fileId,
                                                              int attributeId,
                                                              ByteBuffer dedicatedRecordBuffer) throws IOException {
    int backRefFileId = -dedicatedRecordBuffer.getInt(AttributesRecord.RECORD_FILE_ID_OFFSET);
    int backRefAttributeId = dedicatedRecordBuffer.getInt(AttributesRecord.DEDICATED_RECORD_ATTRIBUTE_ID_OFFSET);
    if (backRefFileId != fileId) {
      throw new CorruptedException("record(" + dedicatedAttributeRecordId + ").fileId(" + fileId + ") " +
                                   "!= backref fileId(" + backRefFileId + "), buffer remains: " +
                                   IOUtil.toHexString(dedicatedRecordBuffer)
      );
    }
    if (backRefAttributeId != attributeId) {
      throw new CorruptedException("record(" + attributeId + ").attributeId(" + attributeId + ") " +
                                   "!= backref attributeId(" + backRefAttributeId + "), buffer remains: " +
                                   IOUtil.toHexString(dedicatedRecordBuffer)
      );
    }

    int valueLength = dedicatedRecordBuffer.remaining() - AttributesRecord.DEDICATED_RECORD_HEADER_SIZE;
    return dedicatedRecordBuffer.slice(AttributesRecord.DEDICATED_RECORD_HEADER_SIZE, valueLength)
      .order(dedicatedRecordBuffer.order());
  }
private static ByteBuffer readDedicatedRecordPayloadAsSlice(int dedicatedAttributeRecordId,
                                                              int fileId,
                                                              int attributeId,
                                                              ByteBuffer dedicatedRecordBuffer)