1 /*------------------------------------------------------------------------------
 2 Name:      I_ReplaceContent.java
 3 Project:   xmlBlaster.org
 4 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
 5 ------------------------------------------------------------------------------*/
 6 package org.xmlBlaster.util;
 7 
 8 import java.util.Map;
 9 
10 /**
11  * Callback interface to replace a byte[], useful for example when publishing in 
12  * stream mode where you need to modify each chunk. 
13  */
14 public interface I_ReplaceContent {
15    /**
16     * Replaces or modifies the oldcontent. The returned instance can be the same as 
17     * passed as the oldContent or it can be a new instance.
18     * @param oldContent
19     * @param clientProperties the map can either be used as attributes or it can be modified in
20     * this method.
21     *  
22     * @return value
23     */
24    byte[] replace(byte[] oldContent, Map clientProperties);
25 }


syntax highlighted by Code2HTML, v. 0.9.1