ru.olegcherednik.icoman.icl.FileHeader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of icon-manager Show documentation
Show all versions of icon-manager Show documentation
Icon Manager (ico, icl, icns).
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();
}
}