}
public ELF(Object img) throws IOException, ELFException {
- if (img instanceof String) image = new MyRandomAccessFile((String)img,"r");
- image = img;
+ if (img instanceof String) {
+ image = fd = new MyRandomAccessFile((String)img, "r");
+ } else {
+ image = img;
+ }
seek(0);
header = new ELFHeader();
pheaders = new PHeader[header.phnum];