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

ru.olegcherednik.icoman.icl.FileHeader Maven / Gradle / Ivy

The newest version!
package ru.olegcherednik.icoman.icl;

import lombok.Data;

import javax.imageio.stream.ImageInputStream;
import java.io.IOException;

/**
 * @author Oleg Cherednik
 * @see IMAGE_FILE_HEADER structure
 * @since 03.10.2016
 */
@Data
final class FileHeader {
    private final int machine;
    private final int numberOfSection;
    private final long timestamp;
    private final long pointerToSymbolTable;
    private final long numberOfSymbols;
    private final int sizeOfOptionalHeader;
    private final int characteristics;

    public FileHeader(ImageInputStream in) throws IOException {
        machine = in.readUnsignedShort();
        numberOfSection = in.readUnsignedShort();
        timestamp = in.readUnsignedInt();
        pointerToSymbolTable = in.readUnsignedInt();
        numberOfSymbols = in.readUnsignedInt();
        sizeOfOptionalHeader = in.readUnsignedShort();
        characteristics = in.readUnsignedShort();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy