1 package com.daffodilwoods.rmi.server; 2 3 import java.rmi.*; 4 import java.sql.*; 5 import java.rmi.server.*; 6 import com.daffodilwoods.rmi.interfaces.*; 7 import com.daffodilwoods.daffodildb.server.datasystem.persistentsystem.DClobUpdatable; 8 public class RmiClobServerSide extends UnicastRemoteObject implements _RmiClob{ 9 10 Clob clob; 11 12 public RmiClobServerSide(Clob clob) throws RemoteException { 13 super(); 14 this.clob = clob; 15 } 16 17 18 public long length() throws SQLException , RemoteException { 19 return clob.length(); 20 } 21 public String getSubString(long pos, int length) throws SQLException , RemoteException { 22 return clob.getSubString(pos,length); 23 } 24 25 public _RmiReader getCharacterStream() throws SQLException , RemoteException { 26 return new RmiReaderServerSide(clob.getCharacterStream()); 27 } 28 29 public _RmiInputStream getAsciiStream() throws SQLException , RemoteException { 30 return new RmiInputStreamServerSide(clob.getAsciiStream()); 31 } 32 33 public long position(String searchstr, long start) throws SQLException , RemoteException { 34 return clob.position(searchstr,start); 35 } 36 37 public long position(Clob searchstr, long start) throws SQLException , RemoteException { 38 return clob.position(searchstr,start); 39 } 40 41 public int setString(long pos, String str, int offset, int len) throws SQLException , RemoteException { 42 return clob.setString(pos,str,offset,len); 43 } 44 45 46 public _RmiOutputStream setAsciiStream(long pos) throws SQLException , RemoteException { 47 return new RmiOutputStreamServerSide(clob.setAsciiStream(pos)); 48 } 49 50 public _RmiWriter setCharacterStream(long pos) throws SQLException , RemoteException { 51 return new RmiWriterServerSide(clob.setCharacterStream(pos)); 52 } 53 54 public void truncate(long len) throws SQLException , RemoteException{ 55 throw new RemoteException(" method not implemented "); 56 } 57 58 } 59 | Popular Tags |