private static final int CHUNK_SIZE = 1024;
public static WyList read(WyObject p) {
FileInputStream fin = (FileInputStream) p.state();
WyList r = new WyList();
try {
int nbytes = 0;
do {
byte[] bytes = new byte[CHUNK_SIZE];
nbytes = fin.read(bytes);
for(int i=0;i!=nbytes;++i) {
r.add(bytes[i]);
}
} while(nbytes == CHUNK_SIZE);
} catch (IOException ioe) {
// what to do here??
}