Until now,
nike air max sale, our communication or simply use the the end of the string. Of course,
air max sale, in the Internet standard protocol where it is the most commonly used. But sometimes we may need to receive a stream of bytes,
air max 2010, or Java objects.
The following is data model and data type, 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,
nike air max 2009, 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, you can receive all the bytes sent by the client,
nike air max shoes, 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,
nike air max 2009 sale, 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.