class Files {

    public static Object getAttribute(final Path path,
                                      final String attribute,
                                      final LinkOption... options)
            throws UnsupportedOperationException, IllegalArgumentException, IOException, SecurityException {
        checkNotNull("path",
                     path);
        checkNotEmpty("attribute",
                      attribute);

        if (attribute.indexOf('*') >= 0 || attribute.indexOf(',') >= 0) {
            throw new IllegalArgumentException(attribute);
        }

        final Map<String, Object> map = readAttributes(path,
                                                       attribute,
                                                       options);
        final String name;

        final int pos = attribute.indexOf(':');
        if (pos == -1) {
            name = attribute;
        } else {
            name = (pos == attribute.length()) ? "" : attribute.substring(pos + 1);
        }

        return map.get(name);
    }

    private  Files();

}