@MarshalsPointer public static long toNative(List<CVBufferAttributes> l, long flags) { if (l == null) { return 0L; } CFArray array = CFMutableArray.create(); for (CVBufferAttributes i : l) { array.add(i.getDictionary()); } return CFType.Marshaler.toNative(array, flags); }
@MarshalsPointer public static List<CVBufferAttributes> toObject( Class<? extends CFType> cls, long handle, long flags) { CFArray o = (CFArray) CFType.Marshaler.toObject(CFArray.class, handle, flags); if (o == null) { return null; } List<CVBufferAttributes> list = new ArrayList<>(); for (int i = 0; i < o.size(); i++) { list.add(new CVBufferAttributes(o.get(i, CFDictionary.class))); } return list; }