public static void serializeData(DataOutputStream outputStream, byte[] data) throws IOException {

		outputStream.writeInt(data.length);
		outputStream.write(data);

		outputStream.flush();
	}
public static void serializeData ( DataOutputStream outputStream , byte [ ] data ) throws IOException { outputStream . writeInt ( data . length ) ; outputStream . write ( data ) ; outputStream . flush ( ) ; }
Serializes the given object into the given writer. The following format will
be used to serialize objects. The first two characters are the type index, see
typeMap above. After that, a single digit that indicates the length of the following
length field follows. After that, the length field is serialized, followed by the
string value of the given object and a space character for human readability.

@param outputStream
@param obj