public @NotNull AttributeOutputStream writeAttribute(final int fileId,
                                                       final @NotNull FileAttribute attribute) {
    connection.ensureFileIdIsValid(fileId);
    final AttributeOutputStream attributeStream = attributesStorage.writeAttribute(connection, fileId, attribute);
    if (attribute.isVersioned()) {
      try {
        DataInputOutputUtil.writeINT(attributeStream, attribute.getVersion());
      }
      catch (IOException e) {
        throw new AssertionError("Write to byte[]-backed stream should not throw IOException -- a bug?", e);
      }
    }

    return attributeStream;
  }
public @NotNull AttributeOutputStream writeAttribute(final int fileId,
                                                       final @NotNull FileAttribute attribute)