KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > projector > value > NullValue


1 /*
2  * $Header: /home/cvs/jakarta-slide/projector/src/java/org/apache/slide/projector/value/Attic/NullValue.java,v 1.3 2004/08/03 14:29:57 dflorey Exp $
3  * $Revision: 1.3 $
4  * $Date: 2004/08/03 14:29:57 $
5  *
6  * ====================================================================
7  *
8  * Copyright 2004 The Apache Software Foundation
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */

23
24 package org.apache.slide.projector.value;
25
26 import de.zeigermann.xml.XMLStringWriter;
27 import de.zeigermann.xml.XMLWriter;
28
29 /**
30  * The NullResource class
31  *
32  */

33 public class NullValue extends ObjectValue implements PrintableValue {
34     public final static String JavaDoc CONTENT_TYPE = "application/unset-resource";
35     public final static NullValue NULL = new NullValue();
36     
37     public NullValue() {
38         super(null);
39     }
40
41     public String JavaDoc getContentType() {
42         return CONTENT_TYPE;
43     }
44
45     public StringBuffer JavaDoc print(StringBuffer JavaDoc buffer) {
46         return buffer;
47     }
48
49     public void save(XMLStringWriter writer) {
50         writer.writeEmptyElement(XMLWriter.createEmptyTag("value"));
51     }
52 }
53
Popular Tags