All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.fornwall.jelf.ElfInitArray Maven / Gradle / Ivy

There is a newer version: 0.9.8
Show newest version
package net.fornwall.jelf;

public class ElfInitArray {

    public final long[] array;

    ElfInitArray(final ElfParser parser, long offset, int size) {
        parser.seek(offset);

        if (parser.elfFile.objectSize == ElfFile.CLASS_32) {
            array = new long[size / 4];
            for (int i = 0; i < array.length; i++) {
                array[i] = parser.readInt();
            }
        } else {
            array = new long[size / 8];
            for (int i = 0; i < array.length; i++) {
                array[i] = parser.readLong();
            }
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy