01: /*
02: * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.rewriter;
06:
07: import java.io.Reader;
08:
09: /**
10: * Heart of the Rewriter component, all the specific language handlers
11: * (HTML,JS,CSS,XML) would provide implementation for this interface.
12: *
13: * @version 1.0 12/15/2001
14: * @author Raja Nagendra Kumar, Nagendra.Raja@sun.com
15: */
16: public interface Rewriter {
17: /**
18: * It is advised to pass the content as Reader, which would allow the Rewriter
19: * to do translation of huge amount of content, as and when it reades the data
20: * from the stream (Incremental or chunked rewritting).
21: */
22: public Reader rewrite(final Reader aReader,
23: final Translator aTranslator);
24:
25: public String rewrite(final String aContent,
26: final Translator aTranslator);
27:
28: }//Interface Rewriter
|