Class TailOf

  • All Implemented Interfaces:
    Input

    public final class TailOf
    extends Object
    implements Input
    Input showing only last N bytes of the stream.

    There is no thread-safety guarantee.

    Since:
    0.30
    • Constructor Detail

      • TailOf

        public TailOf​(Input inpt,
                      int bytes)
        Constructor.
        Parameters:
        inpt - Input to decorate
        bytes - Number of last bytes to show from input
      • TailOf

        public TailOf​(Input inpt,
                      int bytes,
                      int maximum)
        Constructor.
        Parameters:
        inpt - Input to decorate
        bytes - Number of last bytes to show from input
        maximum - Maximum number of bytes to read at once
    • Method Detail

      • stream

        public InputStream stream()
                           throws Exception
        Description copied from interface: Input
        Get read access to it.
        Specified by:
        stream in interface Input
        Returns:
        InputStream to read from
        Throws:
        Exception - If something goes wrong