com.hazelcast.nio
Class IOUtil
java.lang.Object
com.hazelcast.nio.IOUtil
public final class IOUtil
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PRIMITIVE_TYPE_BOOLEAN
public static final byte PRIMITIVE_TYPE_BOOLEAN
- See Also:
- Constant Field Values
PRIMITIVE_TYPE_BYTE
public static final byte PRIMITIVE_TYPE_BYTE
- See Also:
- Constant Field Values
PRIMITIVE_TYPE_SHORT
public static final byte PRIMITIVE_TYPE_SHORT
- See Also:
- Constant Field Values
PRIMITIVE_TYPE_INTEGER
public static final byte PRIMITIVE_TYPE_INTEGER
- See Also:
- Constant Field Values
PRIMITIVE_TYPE_LONG
public static final byte PRIMITIVE_TYPE_LONG
- See Also:
- Constant Field Values
PRIMITIVE_TYPE_FLOAT
public static final byte PRIMITIVE_TYPE_FLOAT
- See Also:
- Constant Field Values
PRIMITIVE_TYPE_DOUBLE
public static final byte PRIMITIVE_TYPE_DOUBLE
- See Also:
- Constant Field Values
PRIMITIVE_TYPE_UTF
public static final byte PRIMITIVE_TYPE_UTF
- See Also:
- Constant Field Values
extractOperationCallId
public static long extractOperationCallId(Data data,
SerializationService serializationService)
throws IOException
- 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!
- Throws:
IOException
writeByteArray
public static void writeByteArray(ObjectDataOutput out,
byte[] value)
throws IOException
- Throws:
IOException
readByteArray
public static byte[] readByteArray(ObjectDataInput in)
throws IOException
- Throws:
IOException
writeObject
public static void writeObject(ObjectDataOutput out,
Object object)
throws IOException
- Throws:
IOException
readObject
public static <T> T readObject(ObjectDataInput in)
throws IOException
- Throws:
IOException
newObjectInputStream
public static ObjectInputStream newObjectInputStream(ClassLoader classLoader,
InputStream in)
throws IOException
- Throws:
IOException
newOutputStream
public static OutputStream newOutputStream(ByteBuffer buf)
newInputStream
public static InputStream newInputStream(ByteBuffer buf)
copyToHeapBuffer
public static int copyToHeapBuffer(ByteBuffer src,
ByteBuffer dest)
copyToDirectBuffer
public static int copyToDirectBuffer(ByteBuffer src,
ByteBuffer dest)
writeLongString
public static void writeLongString(DataOutput dos,
String str)
throws IOException
- Throws:
IOException
readLongString
public static String readLongString(DataInput in)
throws IOException
- Throws:
IOException
compress
public static byte[] compress(byte[] input)
throws IOException
- Throws:
IOException
decompress
public static byte[] decompress(byte[] compressedData)
throws IOException
- Throws:
IOException
writeAttributeValue
public static void writeAttributeValue(Object value,
ObjectDataOutput out)
throws IOException
- Throws:
IOException
readAttributeValue
public static Object readAttributeValue(ObjectDataInput in)
throws IOException
- Throws:
IOException
closeResource
public static void closeResource(Closeable closeable)
- Closes the Closable quietly. So no exception will be thrown. Can also safely be called with a null value.
- Parameters:
closeable
- the Closeable to close.
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.