public <R> R readAttributeRaw(PersistentFSConnection connection,
                                int fileId,
                                @NotNull FileAttribute attribute,
                                ByteBufferReader<R> reader) throws IOException {
    PersistentFSConnection.ensureIdIsValid(fileId);
    lock.readLock().lock();
    try {
      int attributeRecordId = connection.getRecords().getAttributeRecordId(fileId);
      if (attributeRecordId == NON_EXISTENT_ATTRIBUTE_RECORD_ID) {
        return null;
      }
      if (attributeRecordId < 0) {
        throw new IllegalStateException("file[id: " + fileId + "]: attributeRecordId[=" + attributeRecordId + "] is negative, must be >=0");
      }
      int encodedAttributeId = connection.getAttributeId(attribute.getId());

      return readAttributeValue(
        attributeRecordId,
        fileId,
        encodedAttributeId,
        reader
      );
    }
    finally {
      lock.readLock().unlock();
    }
  }
public <R> R readAttributeRaw(PersistentFSConnection connection,
                                int fileId,
                                @NotNull FileAttribute attribute,
                                ByteBufferReader<R> reader)