java/src/org/openantivirus/engine/censor MalwareFoundException.java,NONE,1.1 Censor.java,NONE,1.1 ScanException.java,NONE,1.1

[email protected]
Newsgroups gmane.comp.security.virus.openantivirus.cvs
Message-ID <[email protected]>
Update of /cvsroot/openantivirus/java/src/org/openantivirus/engine/censor
In directory sc8-pr-cvs1:/tmp/cvs-serv4777/java/src/org/openantivirus/engine/censor

Added Files:
	MalwareFoundException.java Censor.java ScanException.java 
Log Message:
Rewrite of the engine to use a virtual file system
Move to 'engine' subdirectory
Added bzip2 and tar decompressors
Switch from GPL to MPL

--- NEW FILE: MalwareFoundException.java ---
/*
 * $Id: MalwareFoundException.java,v 1.1 2003/12/14 11:08:26 kurti Exp $
 * 
 * ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (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.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is OAV.
 *
 * The Initial Developer of the Original Code is Kurt Huwig <[email protected]>.
 * Portions created by the Initial Developer are Copyright (C) 2001-2003
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * ***** END LICENSE BLOCK ***** */

package org.openantivirus.engine.censor;

import org.openantivirus.engine.vfs.*;

/**
 * A malware has been found
 *
 * Pattern-Roles:
 * @author  Kurt Huwig <[email protected]>
 * @version $Revision: 1.1 $
 */
public class MalwareFoundException extends Exception {
    private final String name;
    private final VfsEntry entry;
    
    public MalwareFoundException(String name, VfsEntry entry) {
        this.name = name;
        this.entry = entry;
    }
    
    public String getName() {
        return name;
    }
    
    public VfsEntry getEntry() {
        return entry;
    }
}

--- NEW FILE: Censor.java ---
/*
 * $Id: Censor.java,v 1.1 2003/12/14 11:08:26 kurti Exp $
 * 
 * ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (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.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is OAV.
 *
 * The Initial Developer of the Original Code is Kurt Huwig <[email protected]>.
 * Portions created by the Initial Developer are Copyright (C) 2001-2003
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * ***** END LICENSE BLOCK ***** */

package org.openantivirus.engine.censor;

import org.openantivirus.engine.vfs.*;

/**
 * Takes a file and gives an opinion about it
 *
 * Pattern-Roles:
 * @author  Kurt Huwig <[email protected]>
 * @version $Revision: 1.1 $
 */
public interface Censor {
    /**
     * This means that this censor has not found anything suspicious
     */
    int NOTHING_FOUND  = 1;
    
    /** 
     * This means that the given entry is not infected. Make sure that you
     * are correct before returning this value!
     */
    int ENTRY_CLEAN    = 2;
    
    int censor(VfsEntry entry) throws MalwareFoundException, ScanException;
}

--- NEW FILE: ScanException.java ---
/*
 * $Id: ScanException.java,v 1.1 2003/12/14 11:08:26 kurti Exp $
 * 
 * ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (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.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is OAV.
 *
 * The Initial Developer of the Original Code is Kurt Huwig <[email protected]>.
 * Portions created by the Initial Developer are Copyright (C) 2001-2003
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * ***** END LICENSE BLOCK ***** */

package org.openantivirus.engine.censor;

/**
 * Holds information about an exception that occurred while scanning
 *
 * Pattern-Roles:
 * @author  Kurt Huwig <[email protected]>
 * @version $Revision: 1.1 $
 */
public class ScanException extends Exception {
    private final Exception exception;
    
    public ScanException(Exception exception) {
        this.exception = exception;
    }
    
    public Exception getException() {
        return exception;
    }
}




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.