public class StreamUtil extends Object
Utility class for (Input/Output)Stream.
| 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.
|
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.stream - the stream to skipn - bytes to skipIOExceptionjava.io.FileInputStream#skip(long)}Copyright © 2021 The Apache Software Foundation. All rights reserved.