1 16 package org.apache.cocoon.util; 17 18 import java.sql.Clob ; 19 import java.io.InputStream ; 20 import java.io.Reader ; 21 import java.io.BufferedReader ; 22 import java.io.InputStreamReader ; 23 import java.io.OutputStream ; 24 import java.io.Writer ; 25 26 33 public class ClobHelper implements Clob { 34 35 InputStream in = null; 36 long length = 0; 37 38 public ClobHelper(InputStream is, long len) { 39 this.in = is; 40 this.length = len; 41 } 42 43 public InputStream getAsciiStream() { 44 return this.in; 45 } 46 47 public Reader getCharacterStream() { 48 return new BufferedReader (new InputStreamReader (this.in)); 49 } 50 51 public long length() { 52 return length; 53 } 54 55 58 public String getSubString(long pos, int length) { 59 System.out.println("ClobHelper ** NOT IMPLEMENTED ** getSubString"); 60 return ""; 61 } 62 63 66 public long position(Clob searchstr, long start) { 67 System.out.println("ClobHelper ** NOT IMPLEMENTED ** position(clob,long)"); 68 return -1; } 70 71 74 public long position(String searchstr, long start) { 75 System.out.println("ClobHelper ** NOT IMPLEMENTED ** position(str,long)"); 76 return -1; } 78 79 80 85 86 89 public OutputStream setAsciiStream(long pos) { 90 System.out.println("ClobHelper ** NOT IMPLEMENTED ** setAsciiStream"); 91 return null; 92 } 93 94 97 public Writer setCharacterStream(long pos) { 98 System.out.println("ClobHelper ** NOT IMPLEMENTED ** setCharacterStream"); 99 return null; 100 } 101 102 105 public int setString(long pos, String str){ 106 System.out.println("ClobHelper ** NOT IMPLEMENTED ** setString(long,str)"); 107 return 0; 108 } 109 110 113 public int setString(long pos, String str, int offset, int len){ 114 System.out.println("ClobHelper ** NOT IMPLEMENTED ** setString(long,str,int,int)"); 115 return 0; 116 } 117 118 121 public void truncate(long len){ 122 System.out.println("ClobHelper ** NOT IMPLEMENTED ** truncate"); 123 } 124 125 126 } 127 128 | Popular Tags |