Class Http2.Stream

java.lang.Object
com.codename1.backend.Http2.Stream
Enclosing class:
Http2

public static final class Http2.Stream extends Object
One request, once the client has finished sending it.
  • Method Details

    • getId

      public int getId()
    • getMethod

      public String getMethod()
    • getPath

      public String getPath()
      Path and query, from the :path pseudo-header.
    • getAuthority

      public String getAuthority()
      From :authority, which is what Host is in HTTP/1.1.
    • getHeaders

      public Map getHeaders()
      Lower-cased names, as HTTP/2 requires them on the wire.
    • getBody

      public byte[] getBody()
      The body as it ARRIVED, so the caller can check it before decoding. Empty when the body was spooled; see takeBodyFd().
    • takeBodyFd

      public int takeBodyFd()
      The descriptor of a body that went to disk on arrival (an unlinked temporary file), or -1 when it is in getBody(). Handed over once: the caller owns closing it, and a second call answers -1. Must be called before the next Http2.nextRequest(), which frees an unclaimed one.
    • getBodyLength

      public long getBodyLength()
      The body's whole length, wherever it is.
    • getBodyAsString

      public String getBodyAsString()