Class HeadOf

  • All Implemented Interfaces:
    Input

    public final class HeadOf
    extends Object
    implements Input
    Input that only shows the first N bytes of the original input.
    Since:
    0.31
    • Constructor Detail

      • HeadOf

        public HeadOf​(Input orig,
                      int len)
        Ctor.
        Parameters:
        orig - The original input.
        len - Limit of bytes that can be read from the beginning.
    • 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