Commits

P_W999 committed d4a45a6

- some javadoc

Comments (0)

Files changed (3)

eclipse_dictionary.txt

 exif
 phillip
 guava
+argsfile

src/be/pw/jexif/JExifInfo.java

      * @param tag   the tag to write to.
      * @param value the value to write.
      * @return the exact value that was read from the image after writing it.
-     * @throws JExifException
-     * @throws ExifError
+     * @throws JExifException in case something goes wrong internally.
+     * @throws ExifError      if something went wrong in ExifTool
      */
     @Beta
     public String setTagValue(final Tag tag, final String value) throws ExifError, JExifException {
         return getExactTagValue(tag);
     }
     
+    /**
+     * Reads out all the tag values in human read-able format, even the ones not known in J-ExifTool. 
+     * 
+     * @return a map with all the tag values.
+     * @throws JExifException in case something goes wrong internally.
+     * @throws ExifError      if something went wrong in ExifTool
+     */
     @Beta
     public Map<String, String> getAllTagsValues() throws ExifError, JExifException {
     	return exifTool.getAllTagInfo(file, false);
     }
     
+    /**
+     * Reads out all the tag values in exact format, even the ones not known in J-ExifTool. 
+     * 
+     * @return a map with all the tag values.
+     * @throws JExifException in case something goes wrong internally.
+     * @throws ExifError      if something went wrong in ExifTool
+     */
     @Beta
     public Map<String, String> getAllExactTagsValues() throws ExifError, JExifException {
     	return exifTool.getAllTagInfo(file, true);
     } 
     
+    /**
+     * Reads out all the tag values in human read-able format, limited to only the tags known to J-ExifTool. 
+     * 
+     * @return a map with all the tag values.
+     * @throws JExifException in case something goes wrong internally.
+     * @throws ExifError      if something went wrong in ExifTool
+     * @see be.pw.jexif.enums.tag
+     */
     @Beta
     public Map<Tag, String> getAllSupportedTagsValues() throws ExifError, JExifException {
     	return exifTool.getAllSupportedTagInfo(file, false);
     }
     
+    /**
+     * Reads out all the tag values in exact format, limited to only the tags known to J-ExifTool. 
+     * 
+     * @return a map with all the tag values.
+     * @throws JExifException in case something goes wrong internally.
+     * @throws ExifError      if something went wrong in ExifTool
+     * @see be.pw.jexif.enums.tag
+     */
     @Beta
     public Map<Tag, String> getAllSupportedExactTagsValues() throws ExifError, JExifException {
     	return exifTool.getAllSupportedTagInfo(file, true);

src/be/pw/jexif/JExifTool.java

         return action.getResult().get(tag);
     }
 
-    boolean writeTagInfo(final File file, final Tag tag, final String value) throws ExifError, JExifException {
+    /**
+     * This method will write a value to a given Tag.
+     * @param file the file to which the value should be written.
+     * @param tag the tag that should be written.
+     * @param value the value to write (if null or empty string, the Tag will be cleared)
+     * @throws JExifException when writing the argsfile went wrong or when the Tread.sleep caused problems (or the execution took to long).
+     * @throws ExifError      if there was a problem in ExifTool
+     */
+    void writeTagInfo(final File file, final Tag tag, final String value) throws ExifError, JExifException {
         startIfNecessary();
         int i = 0;
         IAction action;
         List<String> errors = handler.getErrorList();
         LOG.trace("Parsing results");
         ResultHandler.run(action, results, errors);
-        return true;
     }
 
-    Map<String, String> getAllTagInfo(final File file, boolean exact) throws ExifError, JExifException {
+    /**
+     * Returns all the tags, even the ones not known in J-ExifTool.
+     * 
+     * @param file the file from which to read.
+     * @param exact whether the exact value should be returned or not.
+     * @return the map with tag-name - tag-value.
+     * @throws JExifException when writing the argsfile went wrong or when the Tread.sleep caused problems (or the execution took to long).
+     * @throws ExifError      if there was a problem in ExifTool
+     */
+    @SuppressWarnings("unchecked")
+	Map<String, String> getAllTagInfo(final File file, boolean exact) throws ExifError, JExifException {
     	return (Map<String, String>) getAllTagInfo(file, exact, false);
     }
     
-    Map<Tag, String> getAllSupportedTagInfo(final File file, boolean exact) throws ExifError, JExifException {
+    /**
+     * Returns all the tags known to J-ExifTool
+     * 
+     * @param file the file from which to read.
+     * @param exact whether the exact value should be returned or not.
+     * @return the map with tag-name - tag-value.
+     * @throws JExifException when writing the argsfile went wrong or when the Tread.sleep caused problems (or the execution took to long).
+     * @throws ExifError      if there was a problem in ExifTool
+     */
+    @SuppressWarnings("unchecked")
+	Map<Tag, String> getAllSupportedTagInfo(final File file, boolean exact) throws ExifError, JExifException {
     	return (Map<Tag, String>) getAllTagInfo(file, exact, true);
     }
     
-    Map<? extends Object, String> getAllTagInfo(final File file, boolean exact, boolean onlySupported) throws ExifError, JExifException {
+    private Map<? extends Object, String> getAllTagInfo(final File file, boolean exact, boolean onlySupported) throws ExifError, JExifException {
     	startIfNecessary();
     	int i = 0;
         IAction action;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.