Maven module :un.api : api-code :
Class : un.api.code.Codes
Extends/Implements : -
Subclasses : -

author  Johann Sorel


Variables : -
Functions : getTranscoders, createTranscoder, getFormats, getFormat, getFormatForExtension, read, write




Get a list of available transcoders.
return  pair of source to target formats.
public Pair[] getTranscoders ()

public Transcoder createTranscoder (Chars source, Chars target)


Lists available programming formats.
return  array of CodeFormat, never null but can be empty.
public CodeFormat[] getFormats ()

public CodeFormat getFormat (Chars name)

public CodeFormat getFormatForExtension (Chars ext)


Convineent method to read a code source of unknowned format.
The method will loop on available formats until one can decode the source.
param  input
return  CodeContext, never null
throws  IOException if not format could support the source.
public CodeContext read (Object input)


Convenient method to write a code context.
This method will search for the format with given name and try to write
the code.
param  codeContext
param  format
param  output
throws  IOException
public void write (CodeContext codeContext, Chars format, Object output)