if(!destination.exists()){ byte[] data = entry.getValue().getBody().getAttachmentId() != null ? gmailService.users().messages().attachments().get("me", message.getId(), entry.getValue().getBody().getAttachmentId()).execute().decodeData() : entry.getValue().getBody().decodeData(); Puzzle puzzle = singleFilename.endsWith("jpz") ?
/** * An accessor for creating requests from the Attachments collection. * * <p>The typical use is:</p> * <pre> * {@code Gmail gmail = new Gmail(...);} * {@code Gmail.Attachments.List request = gmail.attachments().list(parameters ...)} * </pre> * * @return the resource collection */ public Attachments attachments() { return new Attachments(); }