String ver = m.getPropertyValue("version");
String ver = m.getProperties().getProperty("version");
    private void createMPHDChunk(Map m) throws IOException {        Chunk c = new Chunk("MPHD");        OutputStream out = c.getOutputStream();        String ver = m.getPropertyValue("version");        if (ver == null) {            ver = "0.3";                            // default the value        }        TileSet set = (TileSet) m.getTilesets().get(0);        out.write(Integer.parseInt(ver.substring(0,ver.indexOf('.')-1)));        out.write(Integer.parseInt(ver.substring(ver.indexOf('.')+1)));        out.write(1); out.write(0);                 // LSB, reserved        Util.writeShort(m.getWidth(), out);  Util.writeShort(m.getHeight(), out);        out.write(0); out.write(0); out.write(0); out.write(0);     // reserved        Util.writeShort(m.getTileWidth(), out); Util.writeShort(m.getTileHeight(), out);        Util.writeShort(16, out);                   // tile bitdepth        Util.writeShort(32, out);                   // blkstr bytewidth        Util.writeShort(findAllBlocks(m).size(), out);        Util.writeShort(set.getMaxTileId(), out);        chunks.add(c);    }