@Override
    public void load(FileReading input) throws IOException
    {
        map.create(input.readInteger(), input.readInteger(), input.readInteger(), input.readInteger());
        if (input.readBoolean())
        {
            map.loadSheets(Medias.create(input.readString()));
        }

        final int t = input.readShort();
        for (int v = 0; v < t; v++)
        {
            final int n = input.readShort();
            for (int h = 0; h < n; h++)
            {
                final Tile tile = loadTile(input, v);
                if (tile.getSheet().intValue() > map.getSheetsNumber())
                {
                    throw new IOException(ERROR_SHEET_MISSING + Constant.DOUBLE_DOT + tile.getSheet());
                }
                map.setTile(tile);
            }
        }
    }
@ Override public void load ( FileReading input ) throws IOException { map . create ( input . readInteger ( ) , input . readInteger ( ) , input . readInteger ( ) , input . readInteger ( ) ) ; if ( input . readBoolean ( ) ) { map . loadSheets ( Medias . create ( input . readString ( ) ) ) ; } final int t = input . readShort ( ) ; for ( int v = 0 ; v < t ; v ++ ) { final int n = input . readShort ( ) ; for ( int h = 0 ; h < n ; h ++ ) { final Tile tile = loadTile ( input , v ) ; if ( tile . getSheet ( ) . intValue ( ) > map . getSheetsNumber ( ) ) { throw new IOException ( ERROR_SHEET_MISSING + Constant . DOUBLE_DOT + tile . getSheet ( ) ) ; } map . setTile ( tile ) ; } } }
Load a map from a specified file as binary data.
<p>
Data are loaded this way (see {@link #save(FileWriting)} order):
</p>

<pre>
<code>(String)</code> sheets file configuration
<code>(short)</code> width in tiles
<code>(short)</code> height in tiles
<code>(byte)</code> tile width
<code>(byte)</code> tile height
<code>(short)</code> number of {@value #BLOC_SIZE} horizontal blocs (widthInTile / {@value #BLOC_SIZE})
for each blocs tile
<code>(short)</code> number of tiles in this bloc
for each tile in this bloc
create blank tile
call load(file)
call setTile(...) to update map with this new tile
</pre>

@param input The input level file.
@throws IOException If error on reading.