public final class IOUtil extends Object
Modifier and Type | Field and Description |
---|---|
static byte |
PRIMITIVE_TYPE_BOOLEAN |
static byte |
PRIMITIVE_TYPE_BYTE |
static byte |
PRIMITIVE_TYPE_DOUBLE |
static byte |
PRIMITIVE_TYPE_FLOAT |
static byte |
PRIMITIVE_TYPE_INTEGER |
static byte |
PRIMITIVE_TYPE_LONG |
static byte |
PRIMITIVE_TYPE_SHORT |
static byte |
PRIMITIVE_TYPE_UTF |
Modifier and Type | Method and Description |
---|---|
static void |
closeResource(Closeable closeable)
Closes the Closable quietly.
|
static byte[] |
compress(byte[] input) |
static int |
copyToHeapBuffer(ByteBuffer src,
ByteBuffer dst) |
static byte[] |
decompress(byte[] compressedData) |
static void |
delete(File f)
Ensures that the file described by the supplied parameter does not exist
after the method returns.
|
static long |
extractOperationCallId(Data data,
SerializationService serializationService)
This method has a direct dependency on how objects are serialized in
DataSerializer ! If the stream
format is ever changed this extraction method needs to be changed too! |
static InputStream |
newInputStream(ByteBuffer src) |
static ObjectInputStream |
newObjectInputStream(ClassLoader classLoader,
InputStream in) |
static OutputStream |
newOutputStream(ByteBuffer dst) |
static Object |
readAttributeValue(ObjectDataInput in) |
static byte[] |
readByteArray(ObjectDataInput in) |
static <T> T |
readObject(ObjectDataInput in) |
static String |
toFileName(String name) |
static void |
writeAttributeValue(Object value,
ObjectDataOutput out) |
static void |
writeByteArray(ObjectDataOutput out,
byte[] value) |
static void |
writeObject(ObjectDataOutput out,
Object object) |
public static final byte PRIMITIVE_TYPE_BOOLEAN
public static final byte PRIMITIVE_TYPE_BYTE
public static final byte PRIMITIVE_TYPE_SHORT
public static final byte PRIMITIVE_TYPE_INTEGER
public static final byte PRIMITIVE_TYPE_LONG
public static final byte PRIMITIVE_TYPE_FLOAT
public static final byte PRIMITIVE_TYPE_DOUBLE
public static final byte PRIMITIVE_TYPE_UTF
public static long extractOperationCallId(Data data, SerializationService serializationService) throws IOException
DataSerializer
! If the stream
format is ever changed this extraction method needs to be changed too!IOException
public static void writeByteArray(ObjectDataOutput out, byte[] value) throws IOException
IOException
public static byte[] readByteArray(ObjectDataInput in) throws IOException
IOException
public static void writeObject(ObjectDataOutput out, Object object) throws IOException
IOException
public static <T> T readObject(ObjectDataInput in) throws IOException
IOException
public static ObjectInputStream newObjectInputStream(ClassLoader classLoader, InputStream in) throws IOException
IOException
public static OutputStream newOutputStream(ByteBuffer dst)
public static InputStream newInputStream(ByteBuffer src)
public static int copyToHeapBuffer(ByteBuffer src, ByteBuffer dst)
public static byte[] compress(byte[] input) throws IOException
IOException
public static byte[] decompress(byte[] compressedData) throws IOException
IOException
public static void writeAttributeValue(Object value, ObjectDataOutput out) throws IOException
IOException
public static Object readAttributeValue(ObjectDataInput in) throws IOException
IOException
public static void closeResource(Closeable closeable)
closeable
- the Closeable to close.public static void delete(File f)
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.