stream = new FileInputStream(fileName);
if (stream.skip(skipChars) != skipChars) {
return null;
}
ICARulesGrid grid = new Grid2D(new int[] { width, height }, 0);
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
int s = stream.read();
grid.setState(s, new int[] { x, y });
}
stream.read();
}
return grid;