Class HttpInputStreamUtil.Result

  • Enclosing class:
    HttpInputStreamUtil

    @NullMarked
    public static class HttpInputStreamUtil.Result
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private byte @Nullable [] bytes  
      private Status status  
    • Constructor Summary

      Constructors 
      Constructor Description
      Result()  
      Result​(Status status)  
    • Field Detail

      • bytes

        private byte @Nullable [] bytes
      • status

        private Status status
    • Constructor Detail

      • Result

        public Result()
      • Result

        public Result​(Status status)
    • Method Detail

      • getInputStream

        public @Nullable java.io.InputStream getInputStream()
        Returns the data if the status is Status.SUCCESS.

        In any other case the result is null.

        Returns:
        The contents of the HTTP response or null if empty.
      • getStatus

        public Status getStatus()