sclass ROMIntMemoryFromFile implements IIntMemory, AutoCloseable { File file; int size; RandomAccessFile raf; bool bigEndian; *(File *file) { size = toInt_safe(fileSize(file)/4); raf = randomAccessFileForReading(file); } public void close { dispose raf; } public int get(int idx) ctex { rangeCheck(idx, size); raf.seek(idx*4L); ret bigEndian ? raf.readInt() : raf_readLittleEndianInt(raf); } public void set(int idx, int val) { fail("read-only"); } public int size() { ret size; } }