org.abstracthorizon.mercury.smtp
Class SMTPScanner

java.lang.Object
  extended by org.abstracthorizon.mercury.smtp.SMTPScanner

public class SMTPScanner
extends Object

A class implementing a lexical scanner for an IMAP server.

Author:
Daniel Sendula

Nested Class Summary
static class SMTPScanner.Number
           
 
Field Summary
protected  char[] buffer
          Buffer
protected  boolean eol
          END OF LINE is recognised
protected  InputStream in
          Input stream
protected  boolean literal
          Current literal
protected  int ptr
          Current pointer
 
Constructor Summary
SMTPScanner(InputStream in)
          Constructor
 
Method Summary
protected  boolean alfa_digit(char c)
           
protected  boolean alfa(char c)
           
protected  boolean astring_char(char c)
           
 boolean atDomain(StringBuffer domain)
           
protected  boolean atom_char(char c)
           
 boolean atom(StringBuffer buffer)
           
 void check_eol()
           
protected  boolean digit_nz(char c)
           
protected  boolean digit(char c)
           
 boolean domain(StringBuffer domain)
           
 boolean is_char(char r)
           
 boolean keyword(String keyword)
           
protected  boolean ldh(char c)
           
 boolean ldhStr(StringBuffer buffer)
           
protected  boolean list_char(char c)
           
 boolean localPart(StringBuffer buffer)
           
 boolean number(SMTPScanner.Number num)
           
 boolean nz_number(SMTPScanner.Number num)
           
 boolean path(Path path)
           
 boolean peek_char(char r)
           
 boolean quoted(StringBuffer quoted)
           
 char readChar()
           
 void resetEOL()
          Resets EOL indicator
 void skip_line()
           
protected  boolean text_char(char c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

protected InputStream in
Input stream


buffer

protected char[] buffer
Buffer


literal

protected boolean literal
Current literal


ptr

protected int ptr
Current pointer


eol

protected boolean eol
END OF LINE is recognised

Constructor Detail

SMTPScanner

public SMTPScanner(InputStream in)
Constructor

Parameters:
in - input stream
Method Detail

resetEOL

public void resetEOL()
Resets EOL indicator


atom_char

protected boolean atom_char(char c)

astring_char

protected boolean astring_char(char c)

text_char

protected boolean text_char(char c)

digit_nz

protected boolean digit_nz(char c)

digit

protected boolean digit(char c)

list_char

protected boolean list_char(char c)

alfa

protected boolean alfa(char c)

alfa_digit

protected boolean alfa_digit(char c)

ldh

protected boolean ldh(char c)

readChar

public char readChar()
              throws IOException
Throws:
IOException

skip_line

public void skip_line()
               throws IOException
Throws:
IOException

check_eol

public void check_eol()
               throws IOException,
                      ParserException
Throws:
IOException
ParserException

is_char

public boolean is_char(char r)
                throws IOException
Throws:
IOException

peek_char

public boolean peek_char(char r)
                  throws IOException
Throws:
IOException

number

public boolean number(SMTPScanner.Number num)
               throws IOException
Throws:
IOException

nz_number

public boolean nz_number(SMTPScanner.Number num)
                  throws IOException
Throws:
IOException

keyword

public boolean keyword(String keyword)
                throws IOException
Throws:
IOException

quoted

public boolean quoted(StringBuffer quoted)
               throws IOException,
                      ParserException
Throws:
IOException
ParserException

atom

public boolean atom(StringBuffer buffer)
             throws IOException,
                    ParserException
Throws:
IOException
ParserException

ldhStr

public boolean ldhStr(StringBuffer buffer)
               throws IOException,
                      ParserException
Throws:
IOException
ParserException

path

public boolean path(Path path)
             throws IOException,
                    ParserException
Throws:
IOException
ParserException

atDomain

public boolean atDomain(StringBuffer domain)
                 throws IOException,
                        ParserException
Throws:
IOException
ParserException

domain

public boolean domain(StringBuffer domain)
               throws IOException,
                      ParserException
Throws:
IOException
ParserException

localPart

public boolean localPart(StringBuffer buffer)
                  throws IOException,
                         ParserException
Throws:
IOException
ParserException


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.