public static ImageTyp getImageTyp(ArrayList<Byte> data) {
        if (0 == data.size()) {
            return new NoFileTyp();
        }
        if (0xFF == (data.get(0) & 0xFF)
                && 0xD8 == (data.get(1) & 0xFF)
                && 0xFF == (data.get(2) & 0xFF)
                && 0xE0 == (data.get(3) & 0xFF)) {
            return new JPEGTyp();
        }
        if (0xFF == (data.get(0) & 0xFF)
                && 0xD8 == (data.get(1) & 0xFF)
                && 0xFF == (data.get(2) & 0xFF)
                && 0xE1 == (data.get(3) & 0xFF)) {
            return new JPEGTyp();
        }
        return new UnknownFileTyp();
    }