public class IOUtil
extends java.lang.Object
Constructor and Description |
---|
IOUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
receiveBytes(java.io.InputStream in,
byte[] bytes,
int start,
int size)
Get byte[] from the InputStream
|
static void |
sendBytes(java.io.OutputStream out,
byte[] bytes,
int start,
int size)
Sent the byte[] to OutputStream
|
static void |
setServerSocketOptions(java.net.ServerSocket socket)
Set the options for the ServerSocket
|
static void |
setSocketOptions(java.net.Socket socket)
Set the options for the Socket
|
static Data |
waitAndGet(DataMap dataMap,
java.lang.String contextName,
java.lang.String operationName)
Wait and get a data from DataMap for
collective communication
|
public static void sendBytes(java.io.OutputStream out, byte[] bytes, int start, int size) throws java.io.IOException
out
- the OutputStreambytes
- the byte[]start
- the start indexsize
- the size to sendjava.io.IOException
public static void receiveBytes(java.io.InputStream in, byte[] bytes, int start, int size) throws java.io.IOException
java.io.IOException
public static void setSocketOptions(java.net.Socket socket) throws java.net.SocketException
socket
- the Socketjava.net.SocketException
public static void setServerSocketOptions(java.net.ServerSocket socket) throws java.net.SocketException
socket
- the ServerSocketjava.net.SocketException
public static Data waitAndGet(DataMap dataMap, java.lang.String contextName, java.lang.String operationName)
dataMap
- the DataMapcontextName
- the name of the contextoperationName
- the name of the operation