/** * Overrides the behaviour on {@link BodyPart} to ensure that * only instances of {@link FormDataContentDisposition} can be obtained. * * @return the content disposition. * @throws IllegalArgumentException if the content disposition header cannot be parsed. */ @Override public ContentDisposition getContentDisposition() { if (contentDisposition == null) { String scd = getHeaders().getFirst("Content-Disposition"); if (scd != null) { try { contentDisposition = new FormDataContentDisposition(scd, fileNameFix); } catch (ParseException ex) { throw new IllegalArgumentException(LocalizationMessages.ERROR_PARSING_CONTENT_DISPOSITION(scd), ex); } } } return contentDisposition; }
/** * Overrides the behaviour on {@link BodyPart} to ensure that * only instances of {@link FormDataContentDisposition} can be obtained. * * @return the content disposition. * @throws IllegalArgumentException if the content disposition header cannot be parsed. */ @Override public ContentDisposition getContentDisposition() { if (contentDisposition == null) { String scd = getHeaders().getFirst("Content-Disposition"); if (scd != null) { try { contentDisposition = new FormDataContentDisposition(scd, fileNameFix); } catch (ParseException ex) { throw new IllegalArgumentException(LocalizationMessages.ERROR_PARSING_CONTENT_DISPOSITION(scd), ex); } } } return contentDisposition; }
/** * Overrides the behaviour on {@link BodyPart} to ensure that * only instances of {@link FormDataContentDisposition} can be obtained. * * @return the content disposition. * @throws IllegalArgumentException if the content disposition header cannot be parsed. */ @Override public ContentDisposition getContentDisposition() { if (contentDisposition == null) { String scd = getHeaders().getFirst("Content-Disposition"); if (scd != null) { try { contentDisposition = new FormDataContentDisposition(scd, fileNameFix); } catch (ParseException ex) { throw new IllegalArgumentException(LocalizationMessages.ERROR_PARSING_CONTENT_DISPOSITION(scd), ex); } } } return contentDisposition; }
/** * Overrides the behaviour on {@link BodyPart} to ensure that * only instances of {@link FormDataContentDisposition} can be obtained. * * @return the content disposition. * @throws IllegalArgumentException if the content disposition header cannot be parsed. */ @Override public ContentDisposition getContentDisposition() { if (contentDisposition == null) { String scd = getHeaders().getFirst("Content-Disposition"); if (scd != null) { try { contentDisposition = new FormDataContentDisposition(scd, fileNameFix); } catch (ParseException ex) { throw new IllegalArgumentException(LocalizationMessages.ERROR_PARSING_CONTENT_DISPOSITION(scd), ex); } } } return contentDisposition; }
/** * Overrides the behaviour on {@link BodyPart} to ensure that * only instances of {@link FormDataContentDisposition} can be obtained. * * @return the content disposition. * @throws IllegalArgumentException if the content disposition header cannot be parsed. */ @Override public ContentDisposition getContentDisposition() { if (contentDisposition == null) { String scd = getHeaders().getFirst("Content-Disposition"); if (scd != null) { try { contentDisposition = new FormDataContentDisposition(scd, fileNameFix); } catch (ParseException ex) { throw new IllegalArgumentException(LocalizationMessages.ERROR_PARSING_CONTENT_DISPOSITION(scd), ex); } } } return contentDisposition; }