Source Code Cross Referenced for FilterConsumer.java in  » Scripting » Kawa » gnu » lists » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » Kawa » gnu.lists 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // Copyright (c) 2000, 2001  Per M.A. Bothner and Brainfood Inc.
002:        // This is free software;  for terms and warranty disclaimer see ./COPYING.
003:
004:        package gnu.lists;
005:
006:        /** A Consumer that wraps some other Consumer. */
007:
008:        public class FilterConsumer implements  Consumer {
009:            protected Consumer base;
010:            protected boolean skipping;
011:            /** We seen a startAttribute but not the closing endAttribute. */
012:            protected boolean inAttribute;
013:            /** The 'attribute type' from the most recent startAttribute. */
014:            protected Object attributeType;
015:
016:            public FilterConsumer(Consumer base) {
017:                this .base = base;
018:            }
019:
020:            protected void beforeContent() {
021:            }
022:
023:            public void write(int v) {
024:                beforeContent();
025:                if (!skipping)
026:                    base.write(v);
027:            }
028:
029:            public void writeBoolean(boolean v) {
030:                beforeContent();
031:                if (!skipping)
032:                    base.writeBoolean(v);
033:            }
034:
035:            public void writeFloat(float v) {
036:                beforeContent();
037:                if (!skipping)
038:                    base.writeFloat(v);
039:            }
040:
041:            public void writeDouble(double v) {
042:                beforeContent();
043:                if (!skipping)
044:                    base.writeDouble(v);
045:            }
046:
047:            public void writeInt(int v) {
048:                beforeContent();
049:                if (!skipping)
050:                    base.writeInt(v);
051:            }
052:
053:            public void writeLong(long v) {
054:                beforeContent();
055:                if (!skipping)
056:                    base.writeLong(v);
057:            }
058:
059:            public void startDocument() {
060:                if (!skipping)
061:                    base.startDocument();
062:            }
063:
064:            public void endDocument() {
065:                if (!skipping)
066:                    base.endDocument();
067:            }
068:
069:            public void startElement(Object type) {
070:                if (!skipping)
071:                    base.startElement(type);
072:            }
073:
074:            public void endElement() {
075:                if (!skipping)
076:                    base.endElement();
077:            }
078:
079:            public void startAttribute(Object attrType) {
080:                attributeType = attrType;
081:                inAttribute = true;
082:                if (!skipping)
083:                    base.startAttribute(attrType);
084:            }
085:
086:            public void endAttribute() {
087:                if (!skipping)
088:                    base.endAttribute();
089:                inAttribute = false;
090:            }
091:
092:            public void writeObject(Object v) {
093:                beforeContent();
094:                if (!skipping)
095:                    base.writeObject(v);
096:            }
097:
098:            public boolean ignoring() {
099:                return base.ignoring();
100:            }
101:
102:            public void write(char[] buf, int off, int len) {
103:                beforeContent();
104:                if (!skipping)
105:                    base.write(buf, off, len);
106:            }
107:
108:            public void write(String str) {
109:                write(str, 0, str.length());
110:            }
111:
112:            /* #ifdef use:java.lang.CharSequence */
113:            public void write(CharSequence str, int start, int length)
114:            /* #else */
115:            // public void write (String str, int start, int length)
116:            /* #endif */
117:            {
118:                beforeContent();
119:                if (!skipping)
120:                    base.write(str, start, length);
121:            }
122:
123:            /* #ifdef JAVA5 */
124:            // public Consumer append (char c)
125:            // {
126:            //   write(c);
127:            //   return this;
128:            // }
129:            // public Consumer append (CharSequence csq)
130:            // {
131:            //   if (csq == null)
132:            //     csq = "null";
133:            //   append(csq, 0, csq.length());
134:            //   return this;
135:            // }
136:            // public Consumer append (CharSequence csq, int start, int end)
137:            // {
138:            //   beforeContent();
139:            //   if (! skipping)
140:            //     {
141:            //       if (csq == null)
142:            //         csq = "null";
143:            //       base.append(csq, start, end);
144:            //     }
145:            //   return this;
146:            // }
147:            /* #endif */
148:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.