org.apache.storm.daemon.utils

## Class StreamUtil

- java.lang.Object
- - org.apache.storm.daemon.utils.StreamUtil

-     public class StreamUtil
      extends Object

  Utility class for (Input/Output)Stream.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `skipBytes(InputStream stream, Integer n)` Skips over and discards N bytes of data from the input stream.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### skipBytes

          public static void skipBytes(InputStream stream,
                                       Integer n)
                                throws IOException

      Skips over and discards N bytes of data from the input stream.

      FileInputStream#skip may not work the first time, so ensure it successfully skips the given number of bytes.
      Parameters:
        `stream` - the stream to skip
        `n` - bytes to skip
      Throws:
        `IOException`
      See Also:
        `java.io.FileInputStream#skip(long)}`

Copyright © 2021 The Apache Software Foundation. All rights reserved.