FileDocCategorySizeDatePackage
ClobImpl.javaAPI DocHibernate 3.2.52794Fri Feb 11 20:09:22 GMT 2005org.hibernate.lob

ClobImpl

public class ClobImpl extends Object implements Clob
A dummy implementation of java.sql.Clob that may be used to insert new data into a CLOB.
author
Gavin King

Fields Summary
private Reader
reader
private int
length
private boolean
needsReset
Constructors Summary
public ClobImpl(String string)


	   
		reader = new StringReader(string);
		length = string.length();
	
public ClobImpl(Reader reader, int length)

		this.reader = reader;
		this.length = length;
	
Methods Summary
private static voidexcep()

		throw new UnsupportedOperationException("Blob may not be manipulated from creating session");
	
public java.io.InputStreamgetAsciiStream()

see
java.sql.Clob#getAsciiStream()

		try {
			if (needsReset) reader.reset();
		}
		catch (IOException ioe) {
			throw new SQLException("could not reset reader");
		}
		needsReset = true;
		return new ReaderInputStream(reader);
	
public java.io.ReadergetCharacterStream()

see
java.sql.Clob#getCharacterStream()

		try {
			if (needsReset) reader.reset();
		}
		catch (IOException ioe) {
			throw new SQLException("could not reset reader");
		}
		needsReset = true;
		return reader;
	
public java.lang.StringgetSubString(long pos, int len)

see
java.sql.Clob#getSubString(long, int)

		excep(); return null;
	
public longlength()

see
java.sql.Clob#length()

		return length;
	
public longposition(java.lang.String string, long pos)

see
java.sql.Clob#position(String, long)

		excep(); return 0;
	
public longposition(java.sql.Clob colb, long pos)

see
java.sql.Clob#position(Clob, long)

		excep(); return 0;
	
public java.io.OutputStreamsetAsciiStream(long pos)

see
java.sql.Clob#setAsciiStream(long)

		excep(); return null;
	
public java.io.WritersetCharacterStream(long pos)

see
java.sql.Clob#setCharacterStream(long)

		excep(); return null;
	
public intsetString(long pos, java.lang.String string)

see
java.sql.Clob#setString(long, String)

		excep(); return 0;
	
public intsetString(long pos, java.lang.String string, int i, int j)

see
java.sql.Clob#setString(long, String, int, int)

		excep(); return 0;
	
public voidtruncate(long pos)

see
java.sql.Clob#truncate(long)

		excep();