Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-199

ContentInputStream does not implement InputStream.available

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.1
    • 4.1-alpha1
    • HttpCore NIO
    • None

    Description

      I'm having an issue with ContentInputStream because it does not
      override IS.available() method. Our client code is implemented in such
      way that available() is checked before creating a buffer so that a not
      too big buffer is created. Javadoc for IS.available says:

      • <p> This method should be overridden by subclasses.

      Hence, ContentInputStream should be overriding it. However,
      ContentInputBuffer does to expose the necessary methods to be able
      calculate this but the implementations do have the possibility of
      calculating this, i.e. SimpleInputBuffer. Any chance of improving
      ContentInputBuffer API so that an available() method is added? If so,
      what would be the timeframe for it?

      Attachments

        1. HTTPCORE-199.patch
          3 kB
          Oleg Kalnichevski

        Activity

          People

            Unassigned Unassigned
            galderz Galder Zamarreno
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: