📄 dbresultset.java
字号:
package com.sxit.wap.pdf;
public class DBResultSet implements ResultSet {
private java.sql.ResultSet result = null;
private int bufferSize = 0;
private String title = "" ;
private String[] head =null ;
private Object[] buffer = null;
public DBResultSet() {
}
public DBResultSet ( java.sql.ResultSet result ,String[] head) {
this.result = result;
this.head = head;
}
public void setTitle ( String title ) {
if ( title == null )
return;
this.title = title;
}
public String getTitle () {
return title;
}
public void setHeader ( String[] head ) {
this.head = head;
}
public String[] getHeader () {
return head;
}
public String[] next () {
//返回当前记录,并将指针下移
try {
if (result==null)
return null;
if ( result.next () ){
String[] str = new String[head.length];
for ( int i = 0; i < head.length; i++ ){
str[i] = ( result.getString ( i + 1 ) == null ? "" : result.getString ( i + 1 ) );
str[i] = new String (str[i].getBytes("ISO-8859-1"));
}
return str;
}
return null;
} catch ( Exception e1 ) {
System.out.println ( "error in class DBResultSet method next()" );
}
return null;
}
public void setBufferSize ( int size ) {
/*if (size <=0 || size > 20 )
return;
this.bufferSize = size;
buffer = new Object[size];*/
}
public void priview ( int step ) {
//
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -