jbackup/src/main/java/org/jbundle/jbackup/destination/ZipDestination.java
public void initTransfer(Properties properties)
	{
		super.initTransfer(properties);
		String strPathname = properties.getProperty(ZIPOUT_PATHNAME_PARAM);
		if ((strPathname != null)
			&& (strPathname.length() > 0)
				&& (strPathname.lastIndexOf(System.getProperties().getProperty("file.separator")) == strPathname.length() - 1)
					&& (strPathname.lastIndexOf('/') == strPathname.length() - 1))
						strPathname += System.getProperties().getProperty("file.separator");

		m_strZipFilename = properties.getProperty(ZIPOUT_FILENAME_PARAM);
		if ((m_strZipFilename == null)
			|| (m_strZipFilename.length() == 0)
			|| (m_strZipFilename.equals("[automatic]")))
				m_strZipFilename = this.getBackupFilename();
		
		if (strPathname != null)
			m_strZipFilename = strPathname + m_strZipFilename;

		String strMaxSize = properties.getProperty(MAX_SIZE_PARAM);
		m_lMaxZipFileSize = 0;
		try	{
			if (strMaxSize != null)
				m_lMaxZipFileSize = Long.parseLong(strMaxSize);
		} catch (NumberFormatException ex)	{
			m_lMaxZipFileSize = 0;
		}
		m_lCurrentLength = 0;
		m_iFileNumber = 0;
		try	{
			FileOutputStream outStream = new FileOutputStream(m_strZipFilename);
			m_outZip = new ZipOutputStream(outStream);
		} catch (IOException ex)	{
			ex.printStackTrace();
		}
	}
public void initTransfer(Properties properties)
	{
		super.initTransfer(properties);
		String strPathname = properties.getProperty(ZIPOUT_PATHNAME_PARAM);
		if ((strPathname != null)
			&& (strPathname.length() > 0)
				&& (strPathname.lastIndexOf(System.getProperties().getProperty("file.separator")) == strPathname.length() - 1)
					&& (strPathname.lastIndexOf('/') == strPathname.length() - 1))
						strPathname += System.getProperties().getProperty("file.separator");

		m_strZipFilename = properties.getProperty(ZIPOUT_FILENAME_PARAM);
		if ((m_strZipFilename == null)
			|| (m_strZipFilename.length() == 0)
			|| (m_strZipFilename.equals("[automatic]")))
				m_strZipFilename = this.getBackupFilename();
		
		if (strPathname != null)
			m_strZipFilename = strPathname + m_strZipFilename;

		String strMaxSize = properties.getProperty(MAX_SIZE_PARAM);
		m_lMaxZipFileSize = 0;
		try	{
			if (strMaxSize != null)
				m_lMaxZipFileSize = Long.parseLong(strMaxSize);
		} catch (NumberFormatException ex)	{
			m_lMaxZipFileSize = 0;
		}
		m_lCurrentLength = 0;
		m_iFileNumber = 0;
		try	{
			FileOutputStream outStream = new FileOutputStream(m_strZipFilename);
			m_outZip = new ZipOutputStream(outStream);
		} catch (IOException ex)	{
			ex.printStackTrace();
		}
	}
public void initTransfer ( Properties properties ) { super . initTransfer ( properties ) ; String strPathname = properties . getProperty ( ZIPOUT_PATHNAME_PARAM ) ; if ( ( strPathname != null ) && ( strPathname . length ( ) > 0 ) && ( strPathname . lastIndexOf ( System . getProperties ( ) . getProperty ( "file.separator" ) ) == strPathname . length ( ) - 1 ) && ( strPathname . lastIndexOf ( ' ' ) == strPathname . length ( ) - 1 ) ) strPathname += System . getProperties ( ) . getProperty ( "file.separator" ) ; m_strZipFilename = properties . getProperty ( ZIPOUT_FILENAME_PARAM ) ; if ( ( m_strZipFilename == null ) || ( m_strZipFilename . length ( ) == 0 ) || ( m_strZipFilename . equals ( "[automatic]" ) ) ) m_strZipFilename = this . getBackupFilename ( ) ; if ( strPathname != null ) m_strZipFilename = strPathname + m_strZipFilename ; String strMaxSize = properties . getProperty ( MAX_SIZE_PARAM ) ; m_lMaxZipFileSize = 0 ; try { if ( strMaxSize != null ) m_lMaxZipFileSize = Long . parseLong ( strMaxSize ) ; } catch ( NumberFormatException ex ) { m_lMaxZipFileSize = 0 ; } m_lCurrentLength = 0 ; m_iFileNumber = 0 ; try { FileOutputStream outStream = new FileOutputStream ( m_strZipFilename ) ; m_outZip = new ZipOutputStream ( outStream ) ; } catch ( IOException ex ) { ex . printStackTrace ( ) ; } }
/*
Set up everything to start processing
/ * Set up everything to start processing