|
发表于 2020-8-8 12:15:01
|
显示全部楼层
看你们这么多,还是String最简单啊!
public void save(int n)
{
String s=new String(""+n); //整型变为字符串.
rs.write(s.getBytes(),0,s.length); //假设rs为你的Record对象
}
public int get(int position)
{
byte[] temp=rs.getRecord(position);
return Integer.parseInt(new String(temp));
} |
|