Search in sources :

Example 1 with BufferedImgFileReader

use of uk.me.parabola.imgfmt.app.BufferedImgFileReader in project mkgmap by openstreetmap.

the class FileInfo method typInfo.

/**
 * Read information from the TYP file that we might need when combining it with other files.
 * @param filename The name of the file.
 * @param info The information will be stored here.
 */
private static void typInfo(String filename, FileInfo info) {
    try (ImgChannel chan = new FileImgChannel(filename, "r");
        BufferedImgFileReader fr = new BufferedImgFileReader(chan)) {
        fr.position(0x15);
        info.setCodePage(fr.getChar());
    } catch (IOException e) {
        e.printStackTrace();
    }
}
Also used : FileImgChannel(uk.me.parabola.imgfmt.sys.FileImgChannel) ImgChannel(uk.me.parabola.imgfmt.fs.ImgChannel) IOException(java.io.IOException) FileImgChannel(uk.me.parabola.imgfmt.sys.FileImgChannel) BufferedImgFileReader(uk.me.parabola.imgfmt.app.BufferedImgFileReader)

Aggregations

IOException (java.io.IOException)1 BufferedImgFileReader (uk.me.parabola.imgfmt.app.BufferedImgFileReader)1 ImgChannel (uk.me.parabola.imgfmt.fs.ImgChannel)1 FileImgChannel (uk.me.parabola.imgfmt.sys.FileImgChannel)1