以下のようないくつかのキーと値のペアがあるという点で、.emlファイルがあります
Received: by exchange.mail.com
id <01CC537B.684C4154@exchange.mail.com>; Fri, 5 Aug 2011 19:54:38 +0530
Content-class: urn:content-classes:dsn
Subject: Undeliverable: Prudential mail
Date: Fri, 5 Aug 2011 19:54:38 +0530
MIME-Version: 1.0
Content-Type: multipart/report;
report-type=delivery-status;
boundary="----_=_NextPart_001_01CC537B.684C4154"
This is a multi-part message in MIME format.
キーを取得しようとすると、「id」、「This」もキーと見なされますが、私の要件は、記号「:」と「=」によってのみキー値を取得することです
キー値の独自のセパレーターを設定するにはどうすればよいですか...
(追加情報私はJavaを使用しています。コードは次のとおりです....)
strMailPath = "E:\\BMT_work\\Sample.eml";
File f = new File(strMailPath);
Properties pro = new Properties();
FileInputStream in = new FileInputStream(f);
pro.load(in);
System.out.println("All key are given: " + pro.keySet());
System.out.println("All values are given: " + pro.values());
ArrayList al = new ArrayList(pro.keySet());
ArrayList al2 = new ArrayList(pro.values());
for (int i = 0; i < al.size(); i++) {
System.out.println((i+1)+" "+al.get(i)+" = "+al2.get(i));
}
前もって感謝します。