Implements {@link Files#readAttributes(Path, String, LinkOption...)}.
359490
public ImmutableMap<String, Object> readAttributes(File file, String attributes) {
    String view = getViewName(attributes);
    List<String> attrs = getAttributeNames(attributes);

    if (attrs.size() > 1 && attrs.contains(ALL_ATTRIBUTES)) {
      // attrs contains * and other attributes
      throw new IllegalArgumentException("invalid attributes: " + attributes);
    }

    Map<String, Object> result = new HashMap<>();
    if (attrs.size() == 1 && attrs.contains(ALL_ATTRIBUTES)) {
      // for 'view:*' format, get all keys for all providers for the view
      AttributeProvider provider = providersByName.get(view);
      readAll(file, provider, result);

      for (String inheritedView : provider.inherits()) {
        AttributeProvider inheritedProvider = providersByName.get(inheritedView);
        readAll(file, inheritedProvider, result);
      }
    } else {
      // for 'view:attr1,attr2,etc'
      for (String attr : attrs) {
        result.put(attr, getAttribute(file, view, attr));
      }
    }

    return ImmutableMap.copyOf(result);
  }
1275993
public static final short getShortAttribute(Path path, String attribute, LinkOption... options) throws IOException
    {
        return getShortAttribute(path, attribute, (short)-1, options);
    }
682288
private void scanField(InputStream is)
    throws IOException
  {
    // int accessFlags = readShort();
    // int nameIndex = readShort();
    // int descriptorIndex = readShort();
    
    is.skip(6);

    int attributesCount = readShort(is);

    for (int i = 0; i < attributesCount; i++) {
      scanAttributeForAnnotation(is);
    }
  }
1349426
public static final long getLongAttribute(Path path, String attribute, LinkOption... options) throws IOException
    {
        return getLongAttribute(path, attribute, -1, options);
    }
97275
public static final void setDoubleAttribute(Path path, String attribute, double value, LinkOption... options) throws IOException
    {
        attribute = attribute.startsWith("user:") ? attribute : "user:"+attribute;
        Files.setAttribute(path, attribute, Primitives.writeDouble(value), options);
    }
359651
public void setAttributes(java.util.Collection<String> attributes) {
        if (attributes == null) {
            this.attributes = null;
            return;
        }

        this.attributes = new java.util.ArrayList<String>(attributes);
    }
302998
private String getNodeString(String attribute, String... path)
    {
        final Xml node = getNode(path);
        return node.readString(attribute);
    }
4400
public static final int getIntAttribute(Path path, String attribute, LinkOption... options) throws IOException
    {
        return getIntAttribute(path, attribute, -1, options);
    }
138863
public void addAttributes(final Map<String, Object> attributes) {
        if (attributes != null) {
            for (final Map.Entry<String, Object> entry : attributes.entrySet()) {
                addAttribute(entry.getKey(), entry.getValue());
            }
        }
    }
524518
public static final String getStringAttribute(Path path, String attribute, LinkOption... options) throws IOException
    {
        attribute = attribute.startsWith("user:") ? attribute : "user:"+attribute;
        byte[] attr = (byte[]) Files.getAttribute(path, attribute, options);
        if (attr == null)
        {
            return null;
        }      
        return new String(attr, UTF_8);
    }
104244
public void read(AttributeSet other) {

      for (Iterator<Attribute<?>> iterator = attributes.values().iterator(); iterator.hasNext();) {
         Attribute<Object> attribute = (Attribute<Object>) iterator.next();

         Attribute<Object> a = other.attribute(attribute.name());
         if (a.isModified()) {
            attribute.read(a);
         }
      }
   }
682506
public static Attribute[] getAttributes(InputStream stream) throws IOException, ParseException {
        Reader r = new BufferedReader(new InputStreamReader(stream));
        StreamTokenizer tokenizer = new StreamTokenizer(r);
        
        ArffParser parser = new ArffParser();
        parser.initTokenizer(tokenizer);

        List<Attribute> attributes = new ArrayList<>();
        parser.readHeader(tokenizer, attributes);

        return attributes.toArray(new Attribute[attributes.size()]);
    }
460239
public void setAttributes(java.util.Collection<Attribute> attributes) {
        if (attributes == null) {
            this.attributes = null;
            return;
        }

        this.attributes = new java.util.ArrayList<Attribute>(attributes);
    }
102005
public AttributeDataset parse(String name, Attribute[] attributes, File file) throws IOException, ParseException {
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)))) {
           return parse(name, attributes, reader);
        }
    }
1344617
function getAttribute(path, attrNode) {
    path.forEach(attrName => {
        if (!(attrNode.attributes && attrNode.attributes[attrName])) {
            throw new ImplementationError(`Result-Builder: Unknown attribute "${path.join('.')}"`);
        }
        attrNode = attrNode.attributes[attrName];
    });
    return attrNode;
}
764494
public void setReadAttributes(java.util.Collection<String> readAttributes) {
        if (readAttributes == null) {
            this.readAttributes = null;
            return;
        }

        this.readAttributes = new java.util.ArrayList<String>(readAttributes);
    }
798868
public static final void setLongAttribute(Path path, String attribute, long value, LinkOption... options) throws IOException
    {
        attribute = attribute.startsWith("user:") ? attribute : "user:"+attribute;
        Files.setAttribute(path, attribute, Primitives.writeLong(value), options);
    }