Source code: com/thermidor/xml/output/NulHandler.java
1 package com.thermidor.xml.output;
2 import java.io.IOException;
3 import java.io.File;
4 import java.io.FileOutputStream;
5 import java.io.PrintWriter;
6 import com.thermidor.util.Assert;
7 import java.io.ByteArrayOutputStream;
8 public class NulHandler extends OutputHandler {
9 /**
10 * Construct a new default instance of a NulHandler.
11 */
12 public NulHandler() {
13 super();
14 }
15 /**
16 * <code>start</code> is called on the output handler to initialize it
17 * ready to start processing output.
18 * @param data the initialization data.
19 * @throws InvalidInitializationParameter is raised if the initialization
20 * data was invalid for this instance.
21 * @throws IOException is raised if there was an IO related error.
22 */
23 public void start(Object initializationData)
24 throws InvalidInitializationParameter,
25 IOException {
26 // try {
27 // Assert.isNull(initializationData,
28 // "initialization parameter for handler type [" +
29 // NulHandler.class +
30 // "] must be null");
31 // }
32 // catch(Assert.AssertException ae ) {
33 // throw new InvalidInitializationParameter(ae);
34 // }
35 }
36 /**
37 * Handle the provided string data .
38 * @param data the text data that is to be output.
39 */
40 public void handle(String data) throws IOException{
41 }
42 /**
43 * The responsibilty of the finished member function is to handle clean up
44 * when the output is popped from the output stack.
45 * @return any relevant string data that was collected will the handler
46 * is in operation.
47 */
48 public String finish() throws IOException {
49 return "";
50 }
51 }