KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > lateralnz > c3d > util > PositionData


1 package org.lateralnz.c3d.util;
2
3 import java.io.InputStream JavaDoc;
4 import java.io.Reader JavaDoc;
5
6 import org.lateralnz.common.util.IOUtils;
7
8 /**
9  *
10  * @author jbriggs
11  */

12 public class PositionData {
13   public boolean closed = false; // have we closed the rs for the current thread?
14
public int rowpos = -1; // current row position
15
public Column[] currentcols = null; // the current column data
16
public boolean lastColumnWasNull = false; // was the last column looked at null?
17
public InputStream JavaDoc lastInputStream = null; // the last input stream opened
18
public Reader JavaDoc lastReader = null; // the last reader opened (both used for auto-closing streams)
19

20   public void reset() {
21     rowpos = -1;
22     currentcols = null;
23     lastColumnWasNull = false;
24     IOUtils.close(lastInputStream);
25     lastInputStream = null;
26     IOUtils.close(lastReader);
27     lastReader = null;
28   }
29 }
Popular Tags