Class GreedyInputStream

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

    public class GreedyInputStream
    extends java.io.FilterInputStream
    Input stream wrapper which reads or skips until EOF or requested length.
    • Field Summary

      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      GreedyInputStream​(java.io.InputStream in)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int read​(byte[] buffer, int offset, int length)  
      long skip​(long maximum)  
      • Methods inherited from class java.io.FilterInputStream

        available, close, mark, markSupported, read, read, 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
    • Constructor Detail

      • GreedyInputStream

        public GreedyInputStream​(java.io.InputStream in)
        Parameters:
        in - Underlying input stream.
    • Method Detail

      • read

        public int read​(byte[] buffer,
                        int offset,
                        int length)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • skip

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