title: java TCP server accepting images as well as strings from android client
body: <p>i want to  send string messages as well as images.i am designing android chatting application which user is allowed to share images and chat(string) as well
  Java Server is at the backend which listens and broadcasts.
  I am going through several articles but still confused.
  1)how can i send data and while at receiveing server can know its string or image?
  2)should i have separate sockets for listening and then broadcasting for images and strings respectively
  3)can i have an object which can hold strings as well as images in byte array and passit on to java server?
  Please help
  also i am confused that should i use objectoutputstream/dataoutputstream to achieve it.</p>