private FetchResponse.BodyElement content(final MessageResult messageResult, String name, final int[] path, final boolean isBase) throws MailboxException { final FetchResponse.BodyElement result; Content full; if (isBase) { try { full = messageResult.getFullContent(); } catch (IOException e) { throw new MailboxException("Unable to get content", e); } } else { MessageResult.MimePath mimePath = new MimePathImpl(path); full = messageResult.getMimeBody(mimePath); } if (full == null) { full = new EmptyContent(); } result = new ContentBodyElement(name, full); return result; } }
private FetchResponse.BodyElement content(MessageResult messageResult, String name, int[] path, boolean isBase) throws MailboxException { final FetchResponse.BodyElement result; Content full; if (isBase) { try { full = messageResult.getFullContent(); } catch (IOException e) { throw new MailboxException("Unable to get content", e); } } else { MessageResult.MimePath mimePath = new MimePathImpl(path); full = messageResult.getMimeBody(mimePath); } if (full == null) { full = new EmptyContent(); } result = new ContentBodyElement(name, full); return result; } }