javax.emb
Interface MediaConverterSpec

All Superinterfaces:
java.io.Serializable

public interface MediaConverterSpec
extends java.io.Serializable

An instance of a class implementing this interface collects all properties necessary to perform a conversion from a specific source format to a specific target format. One or more converter spec classes correspond to one converter class, and the contract for accessing the conversion parameters is up to the implementers of the converter spec classes.

A conversion spec instance can be reused for multiple conversions. Also, implementations of this interface must provide a default constructor that initializes all properties with suitable values, in order to allow default conversions. As converter specs sometimes have to be transferred over machine boundaries, this interface extends Serializable. The design allows various parties to come up with implementations for various combinations of media formats.


Method Summary
 MediaConverter (src) getConverter()
          Returns an object implementing the MediaConverter (src) interface that can be used to process conversions using the receiver.
 java.lang.String getTargetFileExtension()
          Returns a file extension as a String that can be used as a default for media objects created using the receiver.
 java.lang.String getTargetMimeType()
          Returns a MIME type as a String that can be used as a default for media objects created using the receiver.
 

Method Detail

getConverter

public MediaConverter (src)  getConverter()
                            throws MediaException (src) 
Returns an object implementing the MediaConverter (src) interface that can be used to process conversions using the receiver. The instance returned is initialized with the receiver to define the conversion specific parameters.

Returns:
the media converter.
Throws:
MediaException (src) - if the instantiation of the converter fails.

getTargetMimeType

public java.lang.String getTargetMimeType()
Returns a MIME type as a String that can be used as a default for media objects created using the receiver. A result of null indicates that the receiver does not alter the media format of the content offered on the given input stream.

Returns:
the target MIME type.

getTargetFileExtension

public java.lang.String getTargetFileExtension()
Returns a file extension as a String that can be used as a default for media objects created using the receiver. The String must not include any separator characters. A result of null indicates that the receiver does not alter the media format of the content offered on the given input stream.

Returns:
the target file extension.