Class AbstractHttpData

    • Field Detail

      • STRIP_PATTERN

        private static final java.util.regex.Pattern STRIP_PATTERN
      • REPLACE_PATTERN

        private static final java.util.regex.Pattern REPLACE_PATTERN
      • name

        protected final java.lang.String name
      • definedSize

        protected long definedSize
      • size

        protected long size
      • charset

        protected java.nio.charset.Charset charset
      • completed

        protected boolean completed
      • maxSize

        protected long maxSize
    • Constructor Detail

      • AbstractHttpData

        protected AbstractHttpData​(java.lang.String name,
                                   java.nio.charset.Charset charset,
                                   long size)
    • Method Detail

      • setMaxSize

        public void setMaxSize​(long maxSize)
        Description copied from interface: HttpData
        Set the maxSize for this HttpData. When limit will be reached, an exception will be raised. Setting it to (-1) means no limitation. By default, to be set from the HttpDataFactory.
        Specified by:
        setMaxSize in interface HttpData
      • checkSize

        public void checkSize​(long newSize)
                       throws java.io.IOException
        Description copied from interface: HttpData
        Check if the new size is not reaching the max limit allowed. The limit is always computed in term of bytes.
        Specified by:
        checkSize in interface HttpData
        Throws:
        java.io.IOException
      • isCompleted

        public boolean isCompleted()
        Specified by:
        isCompleted in interface HttpData
        Returns:
        True if the InterfaceHttpData is completed (all data are stored)
      • getCharset

        public java.nio.charset.Charset getCharset()
        Description copied from interface: HttpData
        Returns the Charset passed by the browser or null if not defined.
        Specified by:
        getCharset in interface HttpData
        Returns:
        the Charset passed by the browser or null if not defined.
      • setCharset

        public void setCharset​(java.nio.charset.Charset charset)
        Description copied from interface: HttpData
        Set the Charset passed by the browser if defined
        Specified by:
        setCharset in interface HttpData
        Parameters:
        charset - Charset to set - must be not null
      • length

        public long length()
        Description copied from interface: HttpData
        Returns the size in byte of the InterfaceHttpData
        Specified by:
        length in interface HttpData
        Returns:
        the size of the InterfaceHttpData