예제 #1
0
 public static RawInputStream getMAPIPropInputStream(Message tnefMsg, int id) {
   try {
     MAPIProp prop = tnefMsg.getMAPIProps().getProp(id);
     if (prop != null) {
       MAPIValue[] vals = prop.getValues();
       if (vals != null) {
         for (int i = 0; i < vals.length; i++) {
           if (vals[i] != null) {
             return vals[i].getRawData();
           }
         }
       }
     }
   } catch (IOException e) {
   }
   return null;
 }
예제 #2
0
 public static Boolean getMAPIPropBoolean(Message tnefMsg, int id) {
   try {
     MAPIProp prop = tnefMsg.getMAPIProps().getProp(id);
     if (prop != null) {
       MAPIValue[] vals = prop.getValues();
       if (vals != null) {
         for (int i = 0; i < vals.length; i++) {
           if (vals[i] != null && vals[i].getValue() instanceof Boolean) {
             return (Boolean) vals[i].getValue();
           }
         }
       }
     }
   } catch (IOException e) {
   }
   return false;
 }
예제 #3
0
 public static String getMAPIPropString(Message tnefMsg, int id) {
   try {
     MAPIProp prop = tnefMsg.getMAPIProps().getProp(id);
     String v = null;
     if (prop != null) {
       MAPIValue[] vals = prop.getValues();
       if (vals != null) {
         v = "";
         for (int i = 0; i < vals.length; i++) {
           if (vals[i] != null) v += clear(toString(vals[i].getValue()), true);
         }
       }
     }
     return v;
   } catch (IOException e) {
   }
   return null;
 }
예제 #4
0
 public static int getMAPIPropInt(Message tnefMsg, int id) {
   try {
     MAPIProp prop = tnefMsg.getMAPIProps().getProp(id);
     if (prop != null) {
       MAPIValue[] vals = prop.getValues();
       if (vals != null) {
         for (int i = 0; i < vals.length; ) {
           String ret = toString(vals[i].getValue());
           if (ret != null) {
             return Integer.parseInt(ret);
           }
         }
       }
     }
   } catch (IOException e) {
   }
   return 0;
 }