public class DataInputOutputUtilRt
extends java.lang.Object
| Constructor and Description |
|---|
DataInputOutputUtilRt() |
| Modifier and Type | Method and Description |
|---|---|
static int |
readINT(java.nio.ByteBuffer byteBuffer) |
static int |
readINT(java.io.DataInput record) |
static <K,V> java.util.Map<K,V> |
readMap(java.io.DataInput in,
ThrowableComputable<? extends K,? extends java.io.IOException> readKey,
ThrowableComputable<? extends V,? extends java.io.IOException> readValue)
Reads a map using the given function to read each element.
|
static <T> java.util.List<T> |
readSeq(java.io.DataInput in,
ThrowableComputable<? extends T,java.io.IOException> readElement)
Reads a collection using the given function to read each element.
|
static void |
writeINT(java.nio.ByteBuffer byteBuffer,
int val) |
static void |
writeINT(java.io.DataOutput record,
int val) |
static <K,V> void |
writeMap(java.io.DataOutput out,
java.util.Map<? extends K,? extends V> map,
ThrowableConsumer<K,? extends java.io.IOException> writeKey,
ThrowableConsumer<V,? extends java.io.IOException> writeValue)
Writes the given map to the output using the given procedure to write each key and value.
|
static <T> void |
writeSeq(java.io.DataOutput out,
java.util.Collection<? extends T> collection,
ThrowableConsumer<T,java.io.IOException> writeElement)
Writes the given collection to the output using the given procedure to write each element.
|
public static int readINT(java.io.DataInput record)
throws java.io.IOException
java.io.IOExceptionpublic static int readINT(java.nio.ByteBuffer byteBuffer)
public static void writeINT(java.io.DataOutput record,
int val)
throws java.io.IOException
java.io.IOExceptionpublic static void writeINT(java.nio.ByteBuffer byteBuffer,
int val)
public static <T> void writeSeq(java.io.DataOutput out,
java.util.Collection<? extends T> collection,
ThrowableConsumer<T,java.io.IOException> writeElement)
throws java.io.IOException
readSeq(java.io.DataInput, com.intellij.openapi.util.ThrowableComputable<? extends T, java.io.IOException>)java.io.IOExceptionpublic static <T> java.util.List<T> readSeq(java.io.DataInput in,
ThrowableComputable<? extends T,java.io.IOException> readElement)
throws java.io.IOException
writeSeq(java.io.DataOutput, java.util.Collection<? extends T>, com.intellij.util.ThrowableConsumer<T, java.io.IOException>)java.io.IOExceptionpublic static <K,V> void writeMap(java.io.DataOutput out,
java.util.Map<? extends K,? extends V> map,
ThrowableConsumer<K,? extends java.io.IOException> writeKey,
ThrowableConsumer<V,? extends java.io.IOException> writeValue)
throws java.io.IOException
readMap(java.io.DataInput, com.intellij.openapi.util.ThrowableComputable<? extends K, ? extends java.io.IOException>, com.intellij.openapi.util.ThrowableComputable<? extends V, ? extends java.io.IOException>)java.io.IOExceptionpublic static <K,V> java.util.Map<K,V> readMap(java.io.DataInput in,
ThrowableComputable<? extends K,? extends java.io.IOException> readKey,
ThrowableComputable<? extends V,? extends java.io.IOException> readValue)
throws java.io.IOException
writeMap(java.io.DataOutput, java.util.Map<? extends K, ? extends V>, com.intellij.util.ThrowableConsumer<K, ? extends java.io.IOException>, com.intellij.util.ThrowableConsumer<V, ? extends java.io.IOException>)java.io.IOException