Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright 2012-04-26 Werner Randelshofer
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.monte.media
Class DefaultRegistry

    java.lang.Object
      org.monte.media.Registry
          org.monte.media.DefaultRegistry

    public class DefaultRegistry

extends Registry

`DefaultRegistry`.

FIXME - The registry should be read from a file.

Version:
  $Id: DefaultRegistry.java 188 2012-03-28 14:03:19Z werner $
Author:
  Werner Randelshofer

Constructor Summary
`DefaultRegistry()`

Method Summary
`java.lang.String[]` | `getCodecClasses(Format inputFormat, Format outputFormat)` Gets all codecs which can transcode from the specified input format to the specified output format.
`java.lang.String` | `getExtension(Format ff)`
`Format` | `getFileFormat(java.io.File file)`
`Format[]` | `getFileFormats()`
`java.lang.String[]` | `getReaderClasses(Format fileFormat)` Gets all reader class names from the registry for the specified file format.
`Format[]` | `getReaderFormats()`
`java.lang.String[]` | `getWriterClasses(Format fileFormat)` Gets all writer class names from the registry for the specified file format.
`Format[]` | `getWriterFormats()`
`protected void` | `init()` Initializes the registry.
`void` | `putBidiCodec(Format inputFormat, Format outputFormat, java.lang.String codecClass)`
`void` | `putCodec(Format inputFormat, Format outputFormat, java.lang.String codecClass)` Puts a codec into the registry.
`void` | `putFileFormat(java.lang.String extension, Format format)`
`void` | `putReader(Format fileFormat, java.lang.String readerClass)` Puts a reader into the registry.
`void` | `putWriter(Format fileFormat, java.lang.String writerClass)` Puts a writer into the registry.
`void` | `unregisterCodec(java.lang.String codecClass)`

Methods inherited from class org.monte.media.Registry
`getCodec, getCodecs, getDecoder, getDecoderClasses, getDecoders, getEncoder, getEncoderClasses, getEncoders, getInstance, getReader, getReader, getWriter, getWriter, suggestOutputFormats`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultRegistry

    public DefaultRegistry()

Method Detail

### getReaderFormats

    public Format[] getReaderFormats()

  Specified by:
    `getReaderFormats` in class `Registry`

### getWriterFormats

    public Format[] getWriterFormats()

  Specified by:
    `getWriterFormats` in class `Registry`

### getFileFormats

    public Format[] getFileFormats()

  Specified by:
    `getFileFormats` in class `Registry`

### init

    protected void init()

  Description copied from class: `Registry`
  Initializes the registry.

  Specified by:
    `init` in class `Registry`

### putBidiCodec

    public void putBidiCodec(Format inputFormat,
                             Format outputFormat,
                             java.lang.String codecClass)

  Parameters:
    `inputFormat` - Must have `MediaTypeKey`, `EncodingKey`, `MimeTypeKey`.
    `outputFormat` - Must have `MediaTypeKey`, `EncodingKey`, `MimeTypeKey`.
    `codecClass` -

### putCodec

    public void putCodec(Format inputFormat,
                         Format outputFormat,
                         java.lang.String codecClass)

  Description copied from class: `Registry`
  Puts a codec into the registry.

  Specified by:
    `putCodec` in class `Registry`
  Parameters:
    `inputFormat` - Must have `MediaTypeKey`, `EncodingKey`, `MimeTypeKey`.
    `outputFormat` - Must have `MediaTypeKey`, `EncodingKey`, `MimeTypeKey`.
    `codecClass` -

### putReader

    public void putReader(Format fileFormat,
                          java.lang.String readerClass)

  Description copied from class: `Registry`
  Puts a reader into the registry.

  Specified by:
    `putReader` in class `Registry`
  Parameters:
    `fileFormat` - Must have `MediaTypeKey`, `MimeTypeKey`.
    `readerClass` -

### putWriter

    public void putWriter(Format fileFormat,
                          java.lang.String writerClass)

  Description copied from class: `Registry`
  Puts a writer into the registry.

  Specified by:
    `putWriter` in class `Registry`
  Parameters:
    `fileFormat` - Must have `MediaTypeKey`, `MimeTypeKey`.
    `writerClass` -

### getCodecClasses

    public java.lang.String[] getCodecClasses(Format inputFormat,
                                              Format outputFormat)

  Description copied from class: `Registry`
  Gets all codecs which can transcode from the specified input format to the specified output format.

  Specified by:
    `getCodecClasses` in class `Registry`
  Parameters:
    `inputFormat` - The input format.
    `outputFormat` - The output format.
  Returns:
    An array of codec class names. If no codec was found, an empty array is returned.

### getReaderClasses

    public java.lang.String[] getReaderClasses(Format fileFormat)

  Description copied from class: `Registry`
  Gets all reader class names from the registry for the specified file format.

  Specified by:
    `getReaderClasses` in class `Registry`
  Parameters:
    `fileFormat` - The file format, e.g."AVI", "QuickTime".
  Returns:
    The reader class names.

### getFileFormat

    public Format getFileFormat(java.io.File file)

  Specified by:
    `getFileFormat` in class `Registry`

### getWriterClasses

    public java.lang.String[] getWriterClasses(Format fileFormat)

  Description copied from class: `Registry`
  Gets all writer class names from the registry for the specified file format.

  Specified by:
    `getWriterClasses` in class `Registry`
  Parameters:
    `fileFormat` - The file format, e.g."AVI", "QuickTime".
  Returns:
    The writer class names.

### putFileFormat

    public void putFileFormat(java.lang.String extension,
                              Format format)

  Specified by:
    `putFileFormat` in class `Registry`

### getExtension

    public java.lang.String getExtension(Format ff)

  Specified by:
    `getExtension` in class `Registry`

### unregisterCodec

    public void unregisterCodec(java.lang.String codecClass)

  Specified by:
    `unregisterCodec` in class `Registry`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright 2012-04-26 Werner Randelshofer
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD