3 import java.io.IOException;
12 * ArrayDataReader subclasses BufferedReader and overrides its
13 * read, readLine, mark, and reset methods so that JmolAdapter
14 * works with String[] arrays without any further adaptation.
18 public class ArrayDataReader extends DataReader {
19 private String[] data;
23 public ArrayDataReader() {
28 public DataReader setData(Object data) {
29 this.data = (String[]) data;
30 len = this.data.length;
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[pt++] : null);
48 public void mark(long ptr) {