public Collection<EnhancedApnsNotification> push(Collection<String> deviceTokens, String payload, Date expiry) throws NetworkIOException {
byte[] messageBytes = Utilities.toUTF8Bytes(payload);
List<EnhancedApnsNotification> notifications = new ArrayList<EnhancedApnsNotification>(deviceTokens.size());
for (String deviceToken : deviceTokens) {
byte[] dtBytes = Utilities.decodeHex(deviceToken);
EnhancedApnsNotification notification =
new EnhancedApnsNotification(c.incrementAndGet(), (int)(expiry.getTime() / 1000), dtBytes, messageBytes);
notifications.add(notification);
push(notification);
}
return notifications;
}