1 16 package org.apache.cocoon.util; 17 18 import java.sql.Blob ; 19 import java.io.InputStream ; 20 import java.io.OutputStream ; 21 22 29 public class BlobHelper implements Blob { 30 31 InputStream in = null; 32 long length = 0; 33 34 public BlobHelper(InputStream is, long len) { 35 this.in = is; 36 this.length = len; 37 } 38 39 public InputStream getBinaryStream() { 40 return this.in; 41 } 42 43 public long length() { 44 return length; 45 } 46 47 50 public byte[] getBytes(long pos, int length) { 51 System.out.println("BlobHelper ** NOT IMPLEMENTED ** getBytes"); 52 return null; 53 } 54 55 58 public long position(Blob pattern, long start) { 59 System.out.println("BlobHelper ** NOT IMPLEMENTED ** position(blog,long)"); 60 return -1; } 62 63 66 public long position(byte[] pattern, long start) { 67 System.out.println("BlobHelper ** NOT IMPLEMENTED ** position(byte[],long)"); 68 return -1; } 70 71 72 77 78 81 public OutputStream setBinaryStream(long pos) { 82 System.out.println("BlobHelper ** NOT IMPLEMENTED ** setBinaryStream"); 83 return null; 84 } 85 86 89 public int setBytes(long pos, byte[] bytes) { 90 System.out.println("BlobHelper ** NOT IMPLEMENTED ** setBytes(long,byte[])"); 91 return 0; 92 } 93 94 97 public int setBytes(long pos, byte[] bytes, int offset, int len) { 98 System.out.println("BlobHelper ** NOT IMPLEMENTED ** setBytes(long,byte[],int,int)"); 99 return 0; 100 } 101 102 105 public void truncate(long len) { 106 System.out.println("BlobHelper ** NOT IMPLEMENTED ** truncate"); 107 } 108 109 110 } 111 112 | Popular Tags |