Until now,
air force 1, our communication or simply use the the end of the string. Of course, in the Internet standard protocol where it is the most commonly used. But sometimes we may need to receive a stream of bytes, or Java objects.
The following is data model and data type,
cheap nike air force, use it you can tell what kind of communication mode ClientHandler use.
data model is used to define QuickServer and customer data exchange format between Socket. Here are three modes currently supported:
DataMode.STRING - This is the default switching mode,
air force 1 shoes, in this mode you can receive the string data (in end)
DataMode. OBJECT - In this mode you can receive serializable Java object. This mode is only used in the java client can write the case.
DataMode.BYTE - In this mode,
air force one 25th, you can receive all the bytes sent by the client,
nike air force, including or or any other control characters. Based on this model in dealing with clients or non-standard protocols such as xml or your own custom hardware protocol is very useful. user-defined data types
QuickServer and customer data exchange between the type of Socket. There are two formats:
DataType.IN - QuickServer specified data as input data.
DataType.OUT - QuickServer specified data output from the data.
any data type data model can be used ClientHandler the setDataMode () method sets the following form
setDataMode (DataMode dataMode,
cheap air force ones, DataType dataType)
Note:
When the mode is DataMode.OBJECT type DataType.IN, call will block until the client is written ObjectOutputStream and head to be refreshed.