3 import java.io.IOException;
11 * VectorDataReader subclasses BufferedReader and overrides its
12 * read, readLine, mark, and reset methods so that JmolAdapter
13 * works with Vector<String> arrays without any further adaptation.
17 public class ListDataReader extends DataReader {
18 private Lst<String> data;
22 public ListDataReader() {
26 @SuppressWarnings("unchecked")
28 public DataReader setData(Object data) {
29 this.data = (Lst<String>) data;
30 len = this.data.size();
35 public int read(char[] buf, int off, int len) throws IOException {
36 return readBuf(buf, off, len);
40 public String readLine() {
41 return (pt < len ? data.get(pt++) : null);
48 public void mark(long ptr) {