org.mmbase.streams.transcoders
Class AbstractTranscoder
java.lang.Object
org.mmbase.streams.transcoders.AbstractTranscoder
- All Implemented Interfaces:
- Serializable, Cloneable, Transcoder, PublicCloneable<Transcoder>
- Direct Known Subclasses:
- CommandTranscoder, InfiniteTranscoder, MockTranscoder
public abstract class AbstractTranscoder
- extends Object
- implements Transcoder
Base transcoder for others.
- Version:
- $Id: AbstractTranscoder.java 42277 2010-05-26 14:03:33Z andre $
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
PACKAGE
public static String PACKAGE
LOG
public static final Logger LOG
clone
protected boolean clone
in
protected URI in
out
protected URI out
format
protected Format format
codec
protected Codec codec
mimeType
protected MimeType mimeType
AbstractTranscoder
protected AbstractTranscoder()
getInstance
public static Transcoder getInstance(String key)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException,
NoSuchMethodException,
InvocationTargetException
- Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
NoSuchMethodException
InvocationTargetException
init
public void init(Node dest)
- Description copied from interface:
Transcoder
- Init the transcoder and destination node with appropiate values.
- Specified by:
init in interface Transcoder
- Parameters:
dest - stream destination Node
setFormat
public void setFormat(String f)
getFormat
public Format getFormat()
- Specified by:
getFormat in interface Transcoder
setCodec
public void setCodec(String c)
getCodec
public Codec getCodec()
- Specified by:
getCodec in interface Transcoder
getMimeType
public MimeType getMimeType()
setMimeType
public void setMimeType(String m)
getKey
public String getKey()
- Default and generic implementation of the key. It can be parsed back to the same transcoder
instance with
getInstance(java.lang.String). This makes for a key which is, like the icaches 'ckey'
key unique and parseable.
The implementation depends on Settings annotations to be set on the classes.
- Specified by:
getKey in interface Transcoder
transcode
public void transcode(URI in,
URI out,
Logger log)
throws Exception
- Description copied from interface:
Transcoder
- Transcode a file to another, follow the process with a logger.
- Specified by:
transcode in interface Transcoder
- Throws:
Exception
transcode
protected abstract void transcode(Logger log)
throws Exception
- Throws:
Exception
toString
public String toString()
- Overrides:
toString in class Object
getIn
public URI getIn()
- Specified by:
getIn in interface Transcoder
getOut
public URI getOut()
- Specified by:
getOut in interface Transcoder
clone
public AbstractTranscoder clone()
- Specified by:
clone in interface PublicCloneable<Transcoder>- Overrides:
clone in class Object
MMBase 2.0-SNAPSHOT - null