public class Utils
extends java.lang.Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.stream.Stream<T> |
concat(java.util.List<java.util.stream.Stream<T>> streams)
Concatenates the given
Streams. |
static void |
createDirectories(java.nio.file.Path dir) |
static void |
readFully(java.nio.channels.ByteChannel src,
java.nio.ByteBuffer data)
Fills the given
ByteBuffer with bytes read from the given ByteChannel. |
static void |
writeFully(java.nio.channels.ByteChannel dst,
java.nio.ByteBuffer data)
Writes the entire contents of the given
ByteBuffer to the given ByteChannel. |
static void |
writeFully(java.nio.channels.GatheringByteChannel dst,
java.nio.ByteBuffer[] data)
Writes the entire contents of all of the given
ByteBuffers to the given ByteChannel. |
public static void createDirectories(java.nio.file.Path dir)
throws java.io.IOException
java.io.IOExceptionpublic static void readFully(java.nio.channels.ByteChannel src,
java.nio.ByteBuffer data)
throws java.io.IOException
ByteBuffer with bytes read from the given ByteChannel.src - the channel to write todata - the data to writejava.io.IOExceptionpublic static void writeFully(java.nio.channels.ByteChannel dst,
java.nio.ByteBuffer data)
throws java.io.IOException
ByteBuffer to the given ByteChannel.dst - the channel to write todata - the data to writejava.io.IOExceptionpublic static void writeFully(java.nio.channels.GatheringByteChannel dst,
java.nio.ByteBuffer[] data)
throws java.io.IOException
ByteBuffers to the given ByteChannel.dst - the channel to write todata - the data to writejava.io.IOExceptionpublic static <T> java.util.stream.Stream<T> concat(java.util.List<java.util.stream.Stream<T>> streams)
Streams.T - the value typestreams - the Streams to concatenateStream containing the concatenated values