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

      byte[] attributeValueBytes = readAttributeValue(
        attributeRecordId,
        fileId, encodedAttributeId
      );

      if (attributeValueBytes == null) {
        return null;
      }
      return new AttributeInputStream(
        new UnsyncByteArrayInputStream(attributeValueBytes),
        connection.getEnumeratedAttributes()
      );
    }
    finally {
      lock.readLock().unlock();
    }
  }
@Override
  public @Nullable AttributeInputStream readAttribute(@NotNull PersistentFSConnection connection,
                                                      int fileId,
                                                      @NotNull FileAttribute attribute)