KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > media > format > image > iio > StandardMediaFormat


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7
8 package org.jboss.media.format.image.iio;
9
10 import java.io.InputStream JavaDoc;
11
12 import javax.emb.MediaException;
13 import javax.emb.MediaHeader;
14 import javax.imageio.ImageReader JavaDoc;
15 import javax.imageio.metadata.IIOMetadata JavaDoc;
16
17 /**
18  * <code>MediaFormat</code> based on the Standard (Plug-in Neutral)
19  * Metadata Format Specification of the Java Image I/O API.
20  *
21  * @version <tt>$Revision: 1.2 $</tt>
22  * @author <a HREF="mailto:ricardoarguello@users.sourceforge.net">Ricardo Argüello</a>
23  */

24 public class StandardMediaFormat extends IIOMediaFormat
25 {
26    // FIXME
27
private static final long serialVersionUID = 0L;
28
29    /**
30     * Constructor.
31     *
32     * @param imageReader
33     */

34    public StandardMediaFormat(ImageReader JavaDoc imageReader)
35    {
36       super(imageReader);
37    }
38
39    /**
40     * @see javax.emb.MediaFormat#extractHeader(javax.emb.Media)
41     */

42    public MediaHeader extractHeader(InputStream JavaDoc content) throws MediaException
43    {
44       IIOMetadata JavaDoc imageMetadata = extractImageMetadata(content);
45       return new StandardMediaHeader(imageMetadata);
46    }
47 }
48
Popular Tags