public class IOUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
BYTE_BUFFERS_USE_NATIVE_BYTE_ORDER |
Modifier and Type | Method and Description |
---|---|
static byte [] |
allocReadWriteUTFBuffer() |
static void |
closeSafe(Logger log,
java.io.Closeable... closeables) |
static boolean |
deleteAllFilesStartingWith(java.io.File file) |
static boolean |
isAscii(char c) |
static boolean |
isAscii(java.lang.CharSequence str) |
static boolean |
isAscii(java.lang.String str) |
static <T> T |
openCleanOrResetBroken(ThrowableComputable<T,? extends java.io.IOException> factoryComputable,
java.io.File file) |
static <T> T |
openCleanOrResetBroken(ThrowableComputable<T,? extends java.io.IOException> factoryComputable,
java.nio.file.Path file) |
static <T> T |
openCleanOrResetBroken(ThrowableComputable<T,? extends java.io.IOException> factoryComputable,
java.lang.Runnable cleanupCallback) |
static java.lang.String |
readString(java.io.DataInput stream) |
static java.util.List<java.lang.String> |
readStringList(java.io.DataInput in) |
static java.lang.String |
readUTF(java.io.DataInput storage) |
static java.lang.String |
readUTFFast(byte [] buffer,
java.io.DataInput storage) |
static void |
syncStream(java.io.OutputStream stream) |
static void |
writeString(java.lang.String s,
java.io.DataOutput stream) |
static void |
writeStringList(java.io.DataOutput out,
java.util.Collection<java.lang.String> list) |
static void |
writeUTF(java.io.DataOutput storage,
java.lang.String value) |
static void |
writeUTFFast(byte [] buffer,
java.io.DataOutput storage,
java.lang.String value) |
static void |
writeUTFTruncated(java.io.DataOutput stream,
java.lang.String text) |
public static final boolean BYTE_BUFFERS_USE_NATIVE_BYTE_ORDER
public static java.lang.String readString(java.io.DataInput stream) throws java.io.IOException
java.io.IOException
public static void writeString(java.lang.String s, java.io.DataOutput stream) throws java.io.IOException
java.io.IOException
public static void writeUTFTruncated(java.io.DataOutput stream, java.lang.String text) throws java.io.IOException
java.io.IOException
public static void writeUTF(java.io.DataOutput storage, java.lang.String value) throws java.io.IOException
java.io.IOException
public static java.lang.String readUTF(java.io.DataInput storage) throws java.io.IOException
java.io.IOException
public static byte [] allocReadWriteUTFBuffer()
public static void writeUTFFast(byte [] buffer, java.io.DataOutput storage, java.lang.String value) throws java.io.IOException
java.io.IOException
public static java.lang.String readUTFFast(byte [] buffer, java.io.DataInput storage) throws java.io.IOException
java.io.IOException
public static boolean isAscii(java.lang.String str)
public static boolean isAscii(java.lang.CharSequence str)
public static boolean isAscii(char c)
public static boolean deleteAllFilesStartingWith(java.io.File file)
public static void syncStream(java.io.OutputStream stream) throws java.io.IOException
java.io.IOException
public static <T> T openCleanOrResetBroken(ThrowableComputable<T,? extends java.io.IOException> factoryComputable, java.nio.file.Path file) throws java.io.IOException
java.io.IOException
public static <T> T openCleanOrResetBroken(ThrowableComputable<T,? extends java.io.IOException> factoryComputable, java.io.File file) throws java.io.IOException
java.io.IOException
public static <T> T openCleanOrResetBroken(ThrowableComputable<T,? extends java.io.IOException> factoryComputable, java.lang.Runnable cleanupCallback) throws java.io.IOException
java.io.IOException
public static void writeStringList(java.io.DataOutput out, java.util.Collection<java.lang.String> list) throws java.io.IOException
java.io.IOException
public static java.util.List<java.lang.String> readStringList(java.io.DataInput in) throws java.io.IOException
java.io.IOException
public static void closeSafe(Logger log, java.io.Closeable... closeables)