private StreamTokenizer getTokenizer()
        throws IOException
    {

        if ( !new File( this.getFilename() ).exists() )
        {
            throw new IOException( this.getFilename() + " does not exist!" );
        }

        if ( this.getEncoding() != null )
        {
            this.reader = new InputStreamReader( new FileInputStream( this.getFilename() ), this.getEncoding() );
        }
        else
        {
            this.reader = new FileReader( this.getFilename() );
        }

        StreamTokenizer stok = new StreamTokenizer( reader );
        //int tok;

        stok.commentChar( '*' );
        stok.wordChars( '_', '_' );

        // set tokenizer to skip comments
        stok.slashStarComments( true );
        stok.slashSlashComments( true );

        return stok;
    }