clobimpl.java
来自「 EasyDBO是一个超轻量级对象-关系映射(Object/Relation M」· Java 代码 · 共 85 行
JAVA
85 行
package com.easyjf.dbo;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
import java.io.StringReader;
import java.sql.Clob;
import java.sql.SQLException;
/**
* @author wangliang138840
*
*/
public class ClobImpl implements Clob{
private Reader reader = null;
private int length;
public ClobImpl(String str){
reader = new StringReader(str);
length = str.length();
}
public ClobImpl(Reader reader, int length){
this.reader = reader;
this.length = length;
}
public long length()
throws SQLException{
return length;
}
public void truncate(long l)
throws SQLException{
}
public InputStream getAsciiStream()
throws SQLException{
return null;
}
public OutputStream setAsciiStream(long l)
throws SQLException{
return null;
}
public Reader getCharacterStream()
throws SQLException{
return reader;
}
public Writer setCharacterStream(long l)
throws SQLException{
return null;
}
public String getSubString(long l, int i)
throws SQLException{
return null;
}
public int setString(long l, String s)
throws SQLException{
return -1;
}
public int setString(long l, String s, int i, int j)
throws SQLException{
return -1;
}
public long position(String s, long l)
throws SQLException{
return -1;
}
public long position(Clob clob, long l)
throws SQLException{
return -1;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?