Show
Ignore:
Timestamp:
08/02/08 05:15:29 PM (5 months ago)
Author:
octorian
Message:

UID support for messages

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/LogicMail/src/org/logicprobe/LogicMail/mail/pop/PopProtocol.java

    r172 r262  
    130130        return executeFollow("TOP " + index + " " + lines); 
    131131    } 
    132  
     132     
     133    /** 
     134     * Execute the "UIDL" command 
     135     * @param index Message index 
     136     */ 
     137    public String executeUidl(int index) throws IOException, MailException { 
     138        if(EventLogger.getMinimumLevel() >= EventLogger.DEBUG_INFO) { 
     139            EventLogger.logEvent( 
     140            AppInfo.GUID, 
     141            ("PopProtocol.executeUidl("+index+")").getBytes(), 
     142            EventLogger.DEBUG_INFO); 
     143        } 
     144        String result = execute("UIDL " + index); 
     145        int p = result.lastIndexOf(' '); 
     146        if(p < result.length() - 2) { 
     147                return result.substring(p+1); 
     148        } 
     149        else { 
     150                return null; 
     151        } 
     152    } 
     153     
    133154    /** 
    134155     * Execute the "DELE" command.