1 15 package org.apache.tapestry.engine; 16 17 import org.apache.tapestry.IMarkupWriter; 18 import org.apache.tapestry.NestedMarkupWriter; 19 20 27 28 public class NullWriter implements NestedMarkupWriter 29 { 30 private static IMarkupWriter shared; 31 32 public static IMarkupWriter getSharedInstance() 33 { 34 if (shared == null) 35 shared = new NullWriter(); 36 37 return shared; 38 } 39 40 public String getBuffer() 41 { 42 return null; 43 } 44 45 public void printRaw(char[] buffer, int offset, int length) 46 { 47 } 48 49 public void printRaw(String value) 50 { 51 } 52 53 public void println() 54 { 55 } 56 57 public void print(char[] data, int offset, int length) 58 { 59 } 60 61 public void print(char value) 62 { 63 } 64 65 public void print(int value) 66 { 67 } 68 69 public void print(String value) 70 { 71 } 72 73 77 78 public NestedMarkupWriter getNestedWriter() 79 { 80 return this; 81 } 82 83 public String getContentType() 84 { 85 return null; 86 } 87 88 public void flush() 89 { 90 } 91 92 public void end() 93 { 94 } 95 96 public void end(String name) 97 { 98 } 99 100 public void comment(String value) 101 { 102 } 103 104 public void closeTag() 105 { 106 } 107 108 public void close() 109 { 110 } 111 112 115 116 public boolean checkError() 117 { 118 return false; 119 } 120 121 public void beginEmpty(String name) 122 { 123 } 124 125 public void begin(String name) 126 { 127 } 128 129 public void attribute(String name, int value) 130 { 131 } 132 133 public void attribute(String name, String value) 134 { 135 } 136 137 141 142 public void attribute(String name, boolean value) 143 { 144 } 145 146 150 151 public void attributeRaw(String name, String value) 152 { 153 } 154 155 public void print(char[] data, int offset, int length, boolean raw) 156 { 157 } 158 159 public void print(String value, boolean raw) 160 { 161 } 162 } | Popular Tags |