Class HttpContent

    • Field Detail

      • isLast

        protected boolean isLast
      • content

        protected org.glassfish.grizzly.Buffer content
    • Constructor Detail

      • HttpContent

        protected HttpContent()
      • HttpContent

        protected HttpContent​(HttpHeader httpHeader)
      • HttpContent

        protected HttpContent​(HttpHeader httpHeader,
                              boolean isLast,
                              org.glassfish.grizzly.Buffer content)
    • Method Detail

      • isContent

        public static boolean isContent​(HttpPacket httpPacket)
        Returns true if passed HttpPacket is a HttpContent.
        Parameters:
        httpPacket -
        Returns:
        true if passed HttpPacket is a HttpContent.
      • isBroken

        public static boolean isBroken​(HttpContent httpContent)
        Returns true if passed HttpContent is a BrokenHttpContent.
        Parameters:
        httpContent -
        Returns:
        true if passed HttpContent is a BrokenHttpContent.
      • create

        public static HttpContent create​(HttpHeader httpHeader,
                                         boolean isLast,
                                         org.glassfish.grizzly.Buffer content)
      • getContent

        public org.glassfish.grizzly.Buffer getContent()
        Get the HTTP message content Buffer.
        Returns:
        Buffer.
      • setContent

        protected final void setContent​(org.glassfish.grizzly.Buffer content)
      • isLast

        public boolean isLast()
        Returns:
        true, if the current content chunk is last, or false, if there are content chunks to follow.
      • setLast

        public void setLast​(boolean isLast)
      • isHeader

        public final boolean isHeader()
        Returns true, if this HTTP message represents HTTP message header, or false otherwise.
        Specified by:
        isHeader in class HttpPacket
        Returns:
        true, if this HTTP message represents HTTP message header, or false otherwise.
      • reset

        protected void reset()
        Reset the internal state.
      • recycle

        public void recycle()
        Specified by:
        recycle in interface org.glassfish.grizzly.Cacheable