<commit_before>/*
 * IzPack - Copyright 2001-2008 <NAME>, All Rights Reserved.
 * 
 * http://izpack.org/ http://izpack.codehaus.org/
 * 
 * Copyright 2007 <NAME>
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.installer;

import java.io.EOFException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.Properties;

import com.izforge.izpack.ExecutableFile;
import com.izforge.izpack.Pack;
import com.izforge.izpack.PackFile;
import com.izforge.izpack.ParsableFile;
import com.izforge.izpack.UpdateCheck;
import com.izforge.izpack.XPackFile;
import com.izforge.izpack.event.InstallerListener;
import com.izforge.izpack.io.CorruptVolumeException;
import com.izforge.izpack.io.FileSpanningInputStream;
import com.izforge.izpack.io.FileSpanningOutputStream;
import com.izforge.izpack.io.VolumeNotFoundException;
import com.izforge.izpack.util.AbstractUIHandler;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.FileExecutor;
import com.izforge.izpack.util.IoHelper;
import com.izforge.izpack.util.OsConstraint;


/**
 * Unpacker class for a multi volume installation.
 *
 * @author <NAME>, <<EMAIL>>
 */
public class MultiVolumeUnpacker extends UnpackerBase
{
    protected IMultiVolumeUnpackerHelper helper;
    
    public MultiVolumeUnpacker(AutomatedInstallData idata, AbstractUIProgressHandler handler)
    {
        super(idata, handler);
        if (handler instanceof PanelAutomation){
            Debug.trace("running in auto installation mode.");
            helper = new MultiVolumeUnpackerAutomationHelper();           
        }
        else {
            Debug.trace("running in normal installation mode.");
            helper = new MultiVolumeUnpackerHelper();
        }
        helper.init(idata, handler);
    }


    protected IMultiVolumeUnpackerHelper getHelper(){
        return this.helper;
    }

    /**
     * The run method.
     */
    public void run()
    {
        addToInstances();
        try
        {
            //<commit_msg>IZPACK-342  MultiVolumeUnpacker now instantiates depending on installation mode... <commit_after>/*
 * IzPack - Copyright 2001-2008 <NAME>, All Rights Reserved.
 * 
 * http://izpack.org/ http://izpack.codehaus.org/
 * 
 * Copyright 2007 <NAME>
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.installer;

import java.io.EOFException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.Properties;

import com.izforge.izpack.ExecutableFile;
import com.izforge.izpack.Pack;
import com.izforge.izpack.PackFile;
import com.izforge.izpack.ParsableFile;
import com.izforge.izpack.UpdateCheck;
import com.izforge.izpack.XPackFile;
import com.izforge.izpack.event.InstallerListener;
import com.izforge.izpack.io.CorruptVolumeException;
import com.izforge.izpack.io.FileSpanningInputStream;
import com.izforge.izpack.io.FileSpanningOutputStream;
import com.izforge.izpack.io.VolumeNotFoundException;
import com.izforge.izpack.util.AbstractUIHandler;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.FileExecutor;
import com.izforge.izpack.util.IoHelper;
import com.izforge.izpack.util.OsConstraint;


/**
 * Unpacker class for a multi volume installation.
 *
 * @author <NAME>, <<EMAIL>>
 */
public class MultiVolumeUnpacker extends UnpackerBase
{
    protected IMultiVolumeUnpackerHelper helper;
    
    public MultiVolumeUnpacker(AutomatedInstallData idata, AbstractUIProgressHandler handler)
    {
        super(idata, handler);
        if (handler instanceof PanelAutomation){
            Debug.trace("running in auto installation mode.");
            helper = new MultiVolumeUnpackerAutomationHelper();           
        }
        else {
            Debug.trace("running in normal installation mode.");
            helper = new MultiVolumeUnpackerHelper();
        }
        helper.init(idata, handler);
    }


    public IMultiVolumeUnpackerHelper getHelper(){
        return this.helper;
    }

    /**
     * The run method.
     */
    public void run()
    {
        addToInstances();
        try
        {
            //
{'fraction_non_alphanumeric': 0.09427019449798493, 'fraction_numerical': 0.0061328193446644474, 'mean_word_length': 3.618122977346278, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7149277', 'n_tokens_mistral': 1687, 'n_tokens_neox': 1609, 'n_words': 432}