KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SnowMailClient > gnupg > LineProcessors > VersionLineProcessor


1 package SnowMailClient.gnupg.LineProcessors;
2
3 import SnowMailClient.gnupg.model.*;
4 import java.util.*;
5
6 /** to be used in the gobbler to read keys from gpg output response
7     either public or secret key, depending on the gpg command
8 */

9 public final class VersionLineProcessor implements LineProcessor
10 {
11   String JavaDoc version = "";
12   String JavaDoc completeVersionDescription = "";
13
14   public void processLine(String JavaDoc line)
15   {
16     completeVersionDescription += "\n"+line;
17     if(version.length()==0) version = line.trim();
18   }
19
20   public String JavaDoc getVersion() { return version; }
21   public String JavaDoc getCompleteVersionDescription() { return completeVersionDescription.trim(); }
22
23
24 }
Popular Tags