Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/voytechs/jnetstream/codec/FilterDecoder.java


1   /*
2    * File: FilterDecoder.java
3    * Auth: Mark Bednarczyk
4    * Date: DATE
5    *   Id: $Id: FilterDecoder.java,v 1.2 2003/09/22 21:02:28 voytechs Exp $
6    ********************************************
7    Copyright (C) 2003  Mark Bednarczyk
8   
9    This program is free software; you can redistribute it and/or
10   modify it under the terms of the GNU General Public License
11   as published by the Free Software Foundation; either version 2
12   of the License, or (at your option) any later version.
13  
14   This program is distributed in the hope that it will be useful,
15   but WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   GNU General Public License for more details.
18  
19   You should have received a copy of the GNU General Public License
20   along with this program; if not, write to the Free Software
21   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22   ********************************************
23   * $Log: FilterDecoder.java,v $
24   * Revision 1.2  2003/09/22 21:02:28  voytechs
25   * Added class comment
26   *
27   * Revision 1.1.1.1  2003/09/22 16:32:15  voytechs
28   * Initial import.
29   *
30   */
31  package com.voytechs.jnetstream.codec;
32  
33  import com.voytechs.jnetstream.npl.*;
34  import com.voytechs.jnetstream.io.*;
35  
36  import java.lang.*;
37  import java.util.zip.*;
38  import java.io.*;
39  
40  /**
41   *  Decoder which allows filtering on packets as they are proccessed.
42   * Appropriate filters can be defined and are immediately applied and checked
43   * as packet input stream is being decoded. Minimum amount of data is decoded
44   * until a filter hit is achieved. Appropriate permit or deny action is taken.
45   * In deny case, the packet processing is stopped with no further processing.
46   */
47  public class FilterDecoder
48    extends Decoder {
49  
50    /* Internal attributes */
51    private static final boolean debug = false;
52  
53    public FilterDecoder(String captureFile)
54      throws FileNotFoundException, IOException, SyntaxError {
55      
56      super(captureFile);
57    }
58  
59    /**
60     * Test function for FilterDecoder
61     * @param args command line arguments
62     */
63    public static void main(String [] args) {
64  
65  //    catch(FileNotFoundException fe) { fe.printStackTrace(); }
66  //    catch(IOException ie) { ie.printStackTrace(); }
67  //    catch(StreamFormatException s) { s.printStackTrace(); }
68  //    catch(SyntaxError se) { se.printStackTrace(); }
69    }
70  
71  } /* END OF: FilterDecoder */