Class DefaultHttpData

    • Constructor Detail

      • DefaultHttpData

        public DefaultHttpData​(byte[] data,
                               boolean endOfStream)
        Creates a new instance.
    • Method Detail

      • array

        public byte[] array()
        Description copied from interface: HttpData
        Returns the underlying byte array of this data.
      • length

        public int length()
        Description copied from interface: HttpData
        Returns the length of this data.
      • isEndOfStream

        public boolean isEndOfStream()
        Description copied from interface: HttpObject
        Tells whether the stream should be ended when writing this object. This can be useful for HttpHeaders-only responses or to more efficiently close the stream along with the last piece of HttpData. This only has meaning for HttpObject writers, not readers.