public void debugPrint(PrintStream out) { out.println("RAW Buffer for IMAGE_FILE_HEADER:"); Streams.hexDump(buff, out); out.println("IMAGE_FILE_HEADER:"); out.println(" machine: " + LittleEndian.toHexString(machine)); out.println(" numberOfSections: " + LittleEndian.toHexString(numberOfSections)); out.println(" timeDateStame: " + new Date(timeDateStamp).toString()); out.println(" pointerToSymbolTable: " + LittleEndian.toHexString(pointerToSymbolTable)); out.println(" numberOfSymbols: " + LittleEndian.toHexString(numberOfSymbols)); out.println(" sizeOfOptionalHeader: " + LittleEndian.toHexString(sizeOfOptionalHeader)); out.println(" characteristics: " + LittleEndian.toHexString(characteristics)); }
public ImageFileHeader(InputStream in) throws IOException { buff = new byte[BUFFER_SIZE]; Streams.readFully(in, buff); loadFromBuffer(); }