/** * Build the content disposition. * * @return the content disposition. */ @SuppressWarnings("unchecked") public V build() { final ContentDisposition cd = new ContentDisposition(type, fileName, creationDate, modificationDate, readDate, size); return (V) cd; } }
/** * Gets the content disposition. * <p/> * The "Content-Disposition" header, if present, will be parsed. * * @return the content disposition, will be null if not present. * @throws IllegalArgumentException if the content disposition header cannot be parsed. */ public ContentDisposition getContentDisposition() { if (contentDisposition == null) { final String scd = headers.getFirst("Content-Disposition"); if (scd != null) { try { contentDisposition = new ContentDisposition(scd); } catch (final ParseException ex) { throw new IllegalArgumentException("Error parsing content disposition: " + scd, ex); } } } return contentDisposition; }
/** * Build the content disposition. * * @return the content disposition. */ @SuppressWarnings("unchecked") public V build() { final ContentDisposition cd = new ContentDisposition(type, fileName, creationDate, modificationDate, readDate, size); return (V) cd; } }
/** * Build the content disposition. * * @return the content disposition. */ @SuppressWarnings("unchecked") public V build() { final ContentDisposition cd = new ContentDisposition(type, fileName, creationDate, modificationDate, readDate, size); return (V) cd; } }
/** * Build the content disposition. * * @return the content disposition. */ @SuppressWarnings("unchecked") public V build() { final ContentDisposition cd = new ContentDisposition(type, fileName, creationDate, modificationDate, readDate, size); return (V) cd; } }
/** * Build the content disposition. * * @return the content disposition. */ @SuppressWarnings("unchecked") public V build() { final ContentDisposition cd = new ContentDisposition(type, fileName, creationDate, modificationDate, readDate, size); return (V) cd; } }
/** * Gets the content disposition. * <p/> * The "Content-Disposition" header, if present, will be parsed. * * @return the content disposition, will be null if not present. * @throws IllegalArgumentException if the content disposition header cannot be parsed. */ public ContentDisposition getContentDisposition() { if (contentDisposition == null) { final String scd = headers.getFirst("Content-Disposition"); if (scd != null) { try { contentDisposition = new ContentDisposition(scd); } catch (final ParseException ex) { throw new IllegalArgumentException("Error parsing content disposition: " + scd, ex); } } } return contentDisposition; }
/** * Gets the content disposition. * <p/> * The "Content-Disposition" header, if present, will be parsed. * * @return the content disposition, will be null if not present. * @throws IllegalArgumentException if the content disposition header cannot be parsed. */ public ContentDisposition getContentDisposition() { if (contentDisposition == null) { final String scd = headers.getFirst("Content-Disposition"); if (scd != null) { try { contentDisposition = new ContentDisposition(scd); } catch (final ParseException ex) { throw new IllegalArgumentException("Error parsing content disposition: " + scd, ex); } } } return contentDisposition; }
/** * Gets the content disposition. * <p/> * The "Content-Disposition" header, if present, will be parsed. * * @return the content disposition, will be null if not present. * @throws IllegalArgumentException if the content disposition header cannot be parsed. */ public ContentDisposition getContentDisposition() { if (contentDisposition == null) { final String scd = headers.getFirst("Content-Disposition"); if (scd != null) { try { contentDisposition = new ContentDisposition(scd); } catch (final ParseException ex) { throw new IllegalArgumentException("Error parsing content disposition: " + scd, ex); } } } return contentDisposition; }
/** * Gets the content disposition. * <p/> * The "Content-Disposition" header, if present, will be parsed. * * @return the content disposition, will be null if not present. * @throws IllegalArgumentException if the content disposition header cannot be parsed. */ public ContentDisposition getContentDisposition() { if (contentDisposition == null) { final String scd = headers.getFirst("Content-Disposition"); if (scd != null) { try { contentDisposition = new ContentDisposition(scd); } catch (final ParseException ex) { throw new IllegalArgumentException("Error parsing content disposition: " + scd, ex); } } } return contentDisposition; }
ContentDisposition contentDisposition = new ContentDisposition((String) httpHeaders.getFirst(HttpHeaders.CONTENT_DISPOSITION)); assertTrue("filename should end with .tds", contentDisposition.getFileName().endsWith(".tds"));
ContentDisposition contentDisposition = new ContentDisposition((String) httpHeaders.getFirst(HttpHeaders.CONTENT_DISPOSITION)); assertTrue("filename should end with .tds", contentDisposition.getFileName().endsWith(".tds"));