Package com.getkeepsafe.relinker.elf
Class ElfParser
- java.lang.Object
-
- com.getkeepsafe.relinker.elf.ElfParser
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.getkeepsafe.relinker.elf.Elf
Elf.DynamicStructure, Elf.Header, Elf.ProgramHeader, Elf.SectionHeader
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Elf.HeaderparseHeader()List<String>parseNeededDependencies()protected voidread(ByteBuffer buffer, long offset, int length)protected shortreadByte(ByteBuffer buffer, long offset)protected intreadHalf(ByteBuffer buffer, long offset)protected longreadLong(ByteBuffer buffer, long offset)protected StringreadString(ByteBuffer buffer, long offset)protected longreadWord(ByteBuffer buffer, long offset)
-
-
-
Constructor Detail
-
ElfParser
public ElfParser(File file) throws FileNotFoundException
- Throws:
FileNotFoundException
-
-
Method Detail
-
parseHeader
public Elf.Header parseHeader() throws IOException
- Throws:
IOException
-
parseNeededDependencies
public List<String> parseNeededDependencies() throws IOException
- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
readString
protected String readString(ByteBuffer buffer, long offset) throws IOException
- Throws:
IOException
-
readLong
protected long readLong(ByteBuffer buffer, long offset) throws IOException
- Throws:
IOException
-
readWord
protected long readWord(ByteBuffer buffer, long offset) throws IOException
- Throws:
IOException
-
readHalf
protected int readHalf(ByteBuffer buffer, long offset) throws IOException
- Throws:
IOException
-
readByte
protected short readByte(ByteBuffer buffer, long offset) throws IOException
- Throws:
IOException
-
read
protected void read(ByteBuffer buffer, long offset, int length) throws IOException
- Throws:
IOException
-
-