title: getting file metadata fields
body: <p>im using this code to get a specific user defined metadata in a image file:</p>
  
  <pre><code>File file = new File("C:\\image.jpg");
          Path path = FileSystems.getDefault().getPath(file.getPath(), "");
          BasicFileAttributes attr = null;
          try {
              attr = Files.readAttributes(path, BasicFileAttributes.class);
          } catch (IOException e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
          }
  
          UserDefinedFileAttributeView view = Files
          .getFileAttributeView(path,UserDefinedFileAttributeView.class);
          String name = "UserDefinedField";
  
          ByteBuffer buf = null;
          try {
              buf = ByteBuffer.allocate(view.size(name));
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
          try {
              view.read(name, buf);
  
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
          buf.flip();
          String value = Charset.defaultCharset().decode(buf).toString();
          System.out.println(value);
  </code></pre>
  
  <p>but i have to know the field, is there a way to LIST ALL OF the metadata fields?!</p>