/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2016 MrInformatic.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package game.saver;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.RandomAccessFile;

/**
 *
 * @author MrInformatic
 */
public class Quarry extends RandomAccessFile{

    public Quarry(String name, String mode) throws FileNotFoundException {
        super(name, mode);
    }
    
    public Quarry(File file, String mode) throws FileNotFoundException {
        super(file, mode);
    }
    
    public void write(Seriable seriable){
        seriable.write(this);
    }
    
    public void read(Seriable seriable){
        seriable.read(this);
    }
}

@@ -1251,16 +1251,81 @@
 essFile;
+%0Aimport java.util.logging.Level;%0Aimport java.util.logging.Logger;
 %0A%0A/**%0A *
@@ -1722,65 +1722,251 @@
 lic 
-void read(Seriable seriable)%7B%0A        seriable.read(this)
+%3CT extends Seriable%3E T read(Class%3CT%3E c)%7B%0A        try %7B%0A            T type = c.newInstance();%0A            type.read(this);%0A            return type;%0A        %7D catch (Exception ex) %7B%0A            ex.printStackTrace();%0A        %7D%0A        return null
 ;%0A  

Update Quarry