コード例 #1
0
 @MarshalsPointer
 public static CFStreamSocketSecurityLevel toObject(
     Class<CFStreamSocketSecurityLevel> cls, long handle, long flags) {
   CFString o = (CFString) CFType.Marshaler.toObject(CFString.class, handle, flags);
   if (o == null) {
     return null;
   }
   return CFStreamSocketSecurityLevel.valueOf(o);
 }
コード例 #2
0
 @MarshalsPointer
 public static List<CFStreamSocketSecurityLevel> toObject(
     Class<? extends CFType> cls, long handle, long flags) {
   CFArray o = (CFArray) CFType.Marshaler.toObject(cls, handle, flags);
   if (o == null) {
     return null;
   }
   List<CFStreamSocketSecurityLevel> list = new ArrayList<>();
   for (int i = 0; i < o.size(); i++) {
     list.add(CFStreamSocketSecurityLevel.valueOf(o.get(i, CFString.class)));
   }
   return list;
 }