/** * Returns an array of all the recipient's names, normally * in TO then CC then BCC order. * Checks all the likely chunks in search of the names. * See also {@link #getDisplayTo()}, {@link #getDisplayCC()} * and {@link #getDisplayBCC()}. */ public String[] getRecipientNamesList() throws ChunkNotFoundException { if(recipientChunks == null || recipientChunks.length == 0) { throw new ChunkNotFoundException("No recipients section present"); } String[] names = new String[recipientChunks.length]; for(int i=0; i<names.length; i++) { RecipientChunks rc = recipientChunks[i]; String name = rc.getRecipientName(); if(name != null) { names[i] = name; } else { throw new ChunkNotFoundException("No display name holding chunks found for the " + (i+1) + "th recipient"); } } return names; }
/** * Returns an array of all the recipient's names, normally * in TO then CC then BCC order. * Checks all the likely chunks in search of the names. * See also {@link #getDisplayTo()}, {@link #getDisplayCC()} * and {@link #getDisplayBCC()}. */ public String[] getRecipientNamesList() throws ChunkNotFoundException { if(recipientChunks == null || recipientChunks.length == 0) { throw new ChunkNotFoundException("No recipients section present"); } String[] names = new String[recipientChunks.length]; for(int i=0; i<names.length; i++) { RecipientChunks rc = recipientChunks[i]; String name = rc.getRecipientName(); if(name != null) { names[i] = name; } else { throw new ChunkNotFoundException("No display name holding chunks found for the " + (i+1) + "th recipient"); } } return names; }