Class EmbeddedProperties

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,​java.lang.String>, java.util.NavigableMap<java.lang.String,​java.lang.String>, java.util.SortedMap<java.lang.String,​java.lang.String>

    public class EmbeddedProperties
    extends java.util.TreeMap<java.lang.String,​java.lang.String>
    Manages the embedding of properties (string name=value pairs) in files
    Since:
    15
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String FILE_PROPERTIES_KEY  
    • Constructor Summary

      Constructors 
      Constructor Description
      EmbeddedProperties()
      Create an empty instance
      EmbeddedProperties​(java.io.File jpegFile)
      Get properties previously written to file
      EmbeddedProperties​(java.util.Map<? extends java.lang.String,​? extends java.lang.String> m)
      Create an instance based on an existing name=value map
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void write()
      Write properties back to the same JPEG image file it was created with, preserving the image file itself
      void write​(java.io.File jpegFile)
      Write properties back to JPEG image file, preserving the image file itself
      • Methods inherited from class java.util.TreeMap

        ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, values
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, isEmpty, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, equals, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, remove
    • Field Detail

      • FILE_PROPERTIES_KEY

        public static final java.lang.String FILE_PROPERTIES_KEY
        See Also:
        Constant Field Values
    • Constructor Detail

      • EmbeddedProperties

        public EmbeddedProperties()
        Create an empty instance
      • EmbeddedProperties

        public EmbeddedProperties​(java.util.Map<? extends java.lang.String,​? extends java.lang.String> m)
        Create an instance based on an existing name=value map
        Parameters:
        m -
      • EmbeddedProperties

        public EmbeddedProperties​(java.io.File jpegFile)
        Get properties previously written to file
        Parameters:
        jpegFile -
    • Method Detail

      • write

        public void write​(java.io.File jpegFile)
                   throws java.io.IOException
        Write properties back to JPEG image file, preserving the image file itself
        Parameters:
        jpegFile -
        Throws:
        java.io.IOException
      • write

        public void write()
                   throws java.io.IOException
        Write properties back to the same JPEG image file it was created with, preserving the image file itself
        Throws:
        java.io.IOException