@SuppressWarnings({"JavaDoc"})
    protected void zipFile( ArchiveEntry entry, ZipArchiveOutputStream zOut, String vPath )
        throws IOException, ArchiverException
    {
		final PlexusIoResource resource = entry.getResource();
		if ( ResourceUtils.isSame(resource, getDestFile() ) )
        {
            throw new ArchiverException( "A zip file cannot include itself" );
        }

        final boolean b = entry.getResource() instanceof SymlinkDestinationSupplier;
        String symlinkTarget = b ? ((SymlinkDestinationSupplier)entry.getResource()).getSymlinkDestination() : null;
        InputStream in = entry.getInputStream();
        try
        {
			zipFile( in, zOut, vPath, resource.getLastModified(), null, entry.getMode(), symlinkTarget );
        }
        catch ( IOException e )
        {
            throw new ArchiverException( "IOException when zipping r" + entry.getName() + ": " + e.getMessage(), e );
        }
        finally
        {
            IOUtil.close( in );
        }
    }
@SuppressWarnings({"JavaDoc"})
    protected void zipFile( ArchiveEntry entry, ZipArchiveOutputStream zOut, String vPath )
        throws IOException, ArchiverException
    {
		final PlexusIoResource resource = entry.getResource();
		if ( ResourceUtils.isSame(resource, getDestFile() ) )
        {
            throw new ArchiverException( "A zip file cannot include itself" );
        }

        final boolean b = entry.getResource() instanceof SymlinkDestinationSupplier;
        String symlinkTarget = b ? ((SymlinkDestinationSupplier)entry.getResource()).getSymlinkDestination() : null;
        InputStream in = entry.getInputStream();
        try
        {
			zipFile( in, zOut, vPath, resource.getLastModified(), null, entry.getMode(), symlinkTarget );
        }
        catch ( IOException e )
        {
            throw new ArchiverException( "IOException when zipping r" + entry.getName() + ": " + e.getMessage(), e );
        }
        finally
        {
            IOUtil.close( in );
        }
    }
@ SuppressWarnings ( { "JavaDoc" } ) protected void zipFile ( ArchiveEntry entry , ZipArchiveOutputStream zOut , String vPath ) throws IOException , ArchiverException { final PlexusIoResource resource = entry . getResource ( ) ; if ( ResourceUtils . isSame ( resource , getDestFile ( ) ) ) { throw new ArchiverException ( "A zip file cannot include itself" ) ; } final boolean b = entry . getResource ( ) instanceof SymlinkDestinationSupplier ; String symlinkTarget = b ? ( ( SymlinkDestinationSupplier ) entry . getResource ( ) ) . getSymlinkDestination ( ) : null ; InputStream in = entry . getInputStream ( ) ; try { zipFile ( in , zOut , vPath , resource . getLastModified ( ) , null , entry . getMode ( ) , symlinkTarget ) ; } catch ( IOException e ) { throw new ArchiverException ( "IOException when zipping r" + entry . getName ( ) + ": " + e . getMessage ( ) , e ) ; } finally { IOUtil . close ( in ) ; } }
Method that gets called when adding from java.io.File instances.
<p/>
<p>This implementation delegates to the six-arg version.</p>

@param entry the file to add to the archive
@param zOut  the stream to write to
@param vPath the name this entry shall have in the archive
Method that gets called when adding from java . io . File instances . <p / > <p > This implementation delegates to the six - arg version . < / p >