日期:2014-05-19 浏览次数:21090 次
FileOutputStream fout = new FileOutputStream("C:\\test.txt");
FileChannel fcout = fout.getChannel();
try {
while (rs.next()) {
buffer.clear();
buffer.put((rs.getLong("ID") + "\t"
+ rs.getLong("NAME") + "\r\n")
.getBytes());
buffer.flip();
fcout.write(buffer);
}
} catch ......