Class ContentDisposition

  • Direct Known Subclasses:
    FormDataContentDisposition

    public class ContentDisposition
    extends java.lang.Object
    A content disposition header.
    • Field Detail

      • type

        private final java.lang.CharSequence type
      • parameters

        private final java.util.Map<java.lang.String,​java.lang.String> parameters
      • fileName

        private java.lang.String fileName
      • creationDate

        private java.util.Date creationDate
      • modificationDate

        private java.util.Date modificationDate
      • readDate

        private java.util.Date readDate
      • size

        private long size
    • Constructor Detail

      • ContentDisposition

        protected ContentDisposition​(java.lang.String type,
                                     java.lang.String fileName,
                                     java.util.Date creationDate,
                                     java.util.Date modificationDate,
                                     java.util.Date readDate,
                                     long size)
      • ContentDisposition

        public ContentDisposition​(java.lang.String header)
                           throws java.text.ParseException
        Throws:
        java.text.ParseException
      • ContentDisposition

        public ContentDisposition​(java.lang.String header,
                                  boolean fileNameFix)
                           throws java.text.ParseException
        Throws:
        java.text.ParseException
      • ContentDisposition

        public ContentDisposition​(HttpHeaderReader reader,
                                  boolean fileNameFix)
                           throws java.text.ParseException
        Throws:
        java.text.ParseException
    • Method Detail

      • getType

        public java.lang.String getType()
        Get the type.
        Returns:
        the type
      • getParameters

        public java.util.Map<java.lang.String,​java.lang.String> getParameters()
        Get the parameters.
        Returns:
        the parameters
      • getFileName

        public java.lang.String getFileName()
        Get the filename parameter.
        Returns:
        the size
      • getCreationDate

        public java.util.Date getCreationDate()
        Get the creation-date parameter.
        Returns:
        the creationDate
      • getModificationDate

        public java.util.Date getModificationDate()
        Get the modification-date parameter.
        Returns:
        the modificationDate
      • getReadDate

        public java.util.Date getReadDate()
        Get the read-date parameter.
        Returns:
        the readDate
      • getSize

        public long getSize()
        Get the size parameter.
        Returns:
        the size
      • toString

        public java.lang.String toString()
        Convert the disposition to a "Content-Disposition" header value.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the "Content-Disposition" value.
      • toStringBuffer

        protected java.lang.StringBuilder toStringBuffer()
      • addStringParameter

        protected void addStringParameter​(java.lang.StringBuilder sb,
                                          java.lang.String name,
                                          java.lang.String p)
      • addDateParameter

        protected void addDateParameter​(java.lang.StringBuilder sb,
                                        java.lang.String name,
                                        java.util.Date p)
      • addLongParameter

        protected void addLongParameter​(java.lang.StringBuilder sb,
                                        java.lang.String name,
                                        java.lang.Long p)
      • createParameters

        private void createParameters()
                               throws java.text.ParseException
        Throws:
        java.text.ParseException
      • createDate

        private java.util.Date createDate​(java.lang.String name)
                                   throws java.text.ParseException
        Throws:
        java.text.ParseException
      • createLong

        private long createLong​(java.lang.String name)
                         throws java.text.ParseException
        Throws:
        java.text.ParseException