/*
 * Copyright (c) 1998 by Sun Microsystems, Inc.
 * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Sun Microsystems, Inc. ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with Sun.
 */

package com.sun.jimi.core.decoder.builtin;

import java.awt.image.ColorModel;
import java.io.*;

import com.sun.jimi.core.*;
import com.sun.jimi.core.raster.*;

/**
 * Decoder factory for inbuilt AWT JPEG decoding.  Has no associated JimiDecoder and is
 * used to signal the built-in special case.
 * @author  Luke Gorrie
 * @version $Revision: 1.2 $ $Date: 1999/04/07 16:04:13 $
 */
public class BuiltinDecoderFactory extends JimiDecoderFactorySupport
	implements com.sun.jimi.core.util.FreeFormat
{
	public static final byte[] FORMAT_SIGNATURE = { (byte)0xff, (byte)0xd8, (byte)0xff };
	//, (byte)0xdb, (byte)0x00, (byte)0x43 };
	public static final String[] MIME_TYPES = { "image/jpeg", "image/jpg" };
	public static final String[] FILENAME_EXTENSIONS = { "jpg", "jpeg" };

	public static final String FORMAT_NAME = "JPEG";

	public byte[] getFormatSignature()
	{
		return FORMAT_SIGNATURE;
	}

	public JimiDecoder createDecoder()
	{
		return null;
	}

	public String[] getMimeTypes()
	{
		return MIME_TYPES;
	}

	public String[] getFilenameExtensions()
	{
		return FILENAME_EXTENSIONS;
	}

	public String getFormatName()
	{
		return FORMAT_NAME;
	}
}

