xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r390658 - /xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterRegistry.java
Date Sat, 01 Apr 2006 12:28:06 GMT
Author: jeremias
Date: Sat Apr  1 04:28:03 2006
New Revision: 390658

URL: http://svn.apache.org/viewcvs?rev=390658&view=rev
Log:
Javadocs

Modified:
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterRegistry.java

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterRegistry.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterRegistry.java?rev=390658&r1=390657&r2=390658&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterRegistry.java
(original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterRegistry.java
Sat Apr  1 04:28:03 2006
@@ -38,6 +38,7 @@
         setup();
     }
     
+    /** @return a singleton instance of the ImageWriterRegistry. */
     public static ImageWriterRegistry getInstance() {
         if (instance == null) {
             instance = new ImageWriterRegistry();
@@ -53,10 +54,21 @@
         }
     }
     
+    /**
+     * Registers a new ImageWriter implementation in the registry. If an ImageWriter for
the same
+     * target MIME type has already been registered, it is overwritten with the new one.
+     * @param writer the ImageWriter instance to register.
+     */
     public void register(ImageWriter writer) {
         imageWriterMap.put(writer.getMIMEType(), writer);
     }
     
+    /**
+     * Returns an ImageWriter that can be used to encode an image to the requested MIME type.
+     * @param mime the MIME type of the desired output format
+     * @return an ImageWriter instance handling the desired output format or null if none
can be
+     *         found.
+     */
     public ImageWriter getWriterFor(String mime) {
         return (ImageWriter)imageWriterMap.get(mime);
     }



---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message