KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > transcoder > Transcoder


1 /*
2
3    Copyright 2000-2001 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17  */

18 package org.apache.batik.transcoder;
19
20 import java.util.Map JavaDoc;
21
22 /**
23  * This class defines an API for transcoding.
24  *
25  * @author <a HREF="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
26  * @version $Id: Transcoder.java,v 1.6 2004/08/18 07:15:41 vhardy Exp $
27  */

28 public interface Transcoder {
29
30     /**
31      * Transcodes the specified input in the specified output.
32      * @param input the input to transcode
33      * @param output the ouput where to transcode
34      * @exception TranscoderException if an error occured while transcoding
35      */

36     void transcode(TranscoderInput input, TranscoderOutput output)
37             throws TranscoderException;
38
39     /**
40      * Returns the transcoding hints of this transcoder.
41      */

42     TranscodingHints getTranscodingHints();
43
44     /**
45      * Sets the value of a single preference for the transcoding process.
46      * @param key the key of the hint to be set
47      * @param value the value indicating preferences for the specified
48      * hint category.
49      */

50     void addTranscodingHint(TranscodingHints.Key key, Object JavaDoc value);
51
52     /**
53      * Removes the value of a single preference for the transcoding process.
54      * @param key the key of the hint to remove
55      */

56     void removeTranscodingHint(TranscodingHints.Key key);
57
58     /**
59      * Replaces the values of all preferences for the transcoding algorithms
60      * with the specified hints.
61      * @param hints the rendering hints to be set
62      */

63     void setTranscodingHints(Map JavaDoc hints);
64
65     /**
66      * Sets the values of all preferences for the transcoding algorithms
67      * with the specified hints.
68      * @param hints the rendering hints to be set
69      */

70     void setTranscodingHints(TranscodingHints hints);
71
72     /**
73      * Sets the error handler this transcoder may use to report
74      * warnings and errors.
75      * @param handler to ErrorHandler to use
76      */

77     void setErrorHandler(ErrorHandler handler);
78
79     /**
80      * Returns the error handler this transcoder uses to report
81      * warnings and errors, or null if any.
82      */

83     ErrorHandler getErrorHandler();
84 }
85
Popular Tags