Class DecompressingEntity.LazyDecompressingInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Enclosing class:
    DecompressingEntity

    private static final class DecompressingEntity.LazyDecompressingInputStream
    extends java.io.FilterInputStream
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.apache.hc.core5.io.IOFunction<java.io.InputStream,​java.io.InputStream> decoder  
      private java.io.InputStream decompressedStream  
      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private LazyDecompressingInputStream​(java.io.InputStream inputStream, org.apache.hc.core5.io.IOFunction<java.io.InputStream,​java.io.InputStream> decoder)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int available()  
      void close()  
      private java.io.InputStream getDecompressedStream()  
      int read()  
      int read​(byte[] b)  
      int read​(byte[] b, int off, int len)  
      long skip​(long n)  
      • Methods inherited from class java.io.FilterInputStream

        mark, markSupported, reset
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • decoder

        private final org.apache.hc.core5.io.IOFunction<java.io.InputStream,​java.io.InputStream> decoder
      • decompressedStream

        private java.io.InputStream decompressedStream
    • Constructor Detail

      • LazyDecompressingInputStream

        private LazyDecompressingInputStream​(java.io.InputStream inputStream,
                                             org.apache.hc.core5.io.IOFunction<java.io.InputStream,​java.io.InputStream> decoder)
    • Method Detail

      • getDecompressedStream

        private java.io.InputStream getDecompressedStream()
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • skip

        public long skip​(long n)
                  throws java.io.IOException
        Overrides:
        skip in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • available

        public int available()
                      throws java.io.IOException
        Overrides:
        available in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.FilterInputStream
        Throws:
        java.io.IOException