Source Code Cross Referenced for ClobHelper.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » util » 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 » Content Management System » apache lenya 2.0 » org.apache.cocoon.util 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         * 
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         * 
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:        package org.apache.cocoon.util;
018:
019:        import java.sql.Clob;
020:        import java.io.InputStream;
021:        import java.io.Reader;
022:        import java.io.BufferedReader;
023:        import java.io.InputStreamReader;
024:        import java.io.OutputStream;
025:        import java.io.Writer;
026:
027:        /**
028:         * A minimal implementation just enough to send a CLOB to a
029:         * database. Advanced methods and all methods for modifying the CLOB
030:         * are not implemented.
031:         *
032:         * @version CVS $Id: ClobHelper.java 476958 2006-11-19 22:36:03Z anathaniel $
033:         */
034:        public class ClobHelper implements  Clob {
035:
036:            InputStream in = null;
037:            long length = 0;
038:
039:            public ClobHelper(InputStream is, long len) {
040:                this .in = is;
041:                this .length = len;
042:            }
043:
044:            public InputStream getAsciiStream() {
045:                return this .in;
046:            }
047:
048:            public Reader getCharacterStream() {
049:                return new BufferedReader(new InputStreamReader(this .in));
050:            }
051:
052:            public long length() {
053:                return length;
054:            }
055:
056:            /**
057:             * Not implemented.
058:             */
059:            public String getSubString(long pos, int length) {
060:                System.out
061:                        .println("ClobHelper ** NOT IMPLEMENTED ** getSubString");
062:                return "";
063:            }
064:
065:            /**
066:             * Not implemented.
067:             */
068:            public long position(Clob searchstr, long start) {
069:                System.out
070:                        .println("ClobHelper ** NOT IMPLEMENTED ** position(clob,long)");
071:                return -1; // we don't implement this
072:            }
073:
074:            /**
075:             * Not implemented.
076:             */
077:            public long position(String searchstr, long start) {
078:                System.out
079:                        .println("ClobHelper ** NOT IMPLEMENTED ** position(str,long)");
080:                return -1; // we don't implement this
081:            }
082:
083:            // if ever implemented.... the following  are the JDBC3 methods
084:            // since not implemented anyway, included in JDBC2 builds as well.
085:            // @JDBC3_START@
086:            // @JDBC3_END@
087:
088:            /**
089:             * Not implemented.
090:             */
091:            public OutputStream setAsciiStream(long pos) {
092:                System.out
093:                        .println("ClobHelper ** NOT IMPLEMENTED ** setAsciiStream");
094:                return null;
095:            }
096:
097:            /**
098:             * Not implemented.
099:             */
100:            public Writer setCharacterStream(long pos) {
101:                System.out
102:                        .println("ClobHelper ** NOT IMPLEMENTED ** setCharacterStream");
103:                return null;
104:            }
105:
106:            /**
107:             * Not implemented.
108:             */
109:            public int setString(long pos, String str) {
110:                System.out
111:                        .println("ClobHelper ** NOT IMPLEMENTED ** setString(long,str)");
112:                return 0;
113:            }
114:
115:            /**
116:             * Not implemented.
117:             */
118:            public int setString(long pos, String str, int offset, int len) {
119:                System.out
120:                        .println("ClobHelper ** NOT IMPLEMENTED ** setString(long,str,int,int)");
121:                return 0;
122:            }
123:
124:            /**
125:             * Not implemented.
126:             */
127:            public void truncate(long len) {
128:                System.out.println("ClobHelper ** NOT IMPLEMENTED ** truncate");
129:            }
130:
131:            /**
132:             * Not implemented (Java6 extension).
133:             */
134:            public void free() {
135:                System.out.println("BlobHelper ** NOT IMPLEMENTED ** free");
136:            }
137:
138:            /**
139:             * Not implemented (Java6 extension).
140:             */
141:            public Reader getCharacterStream(long pos, long length) {
142:                System.out
143:                        .println("BlobHelper ** NOT IMPLEMENTED ** getCharacterStream(long,long");
144:                return null;
145:            }
146:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.