title: How to read byte array data in Dart?
body: <p>connecting TCP Socket server and sending Request. and also Server sends the response in  Byte array. How to read byte array data in dart.</p>
  
  <pre><code>Socket.connect('localhost', 8081)
    .then((socket) {
  //Establish the onData, and onDone callbacks
  socket.listen((data) {
    print(new String.fromCharCodes(data).trim()); //Here data is byte[]
    //How to read byte array data
  
  },
      onDone: () {
        print("Done");
        // socket.destroy();
  
      },
      onError: (e) {
        print('Server error: $e');
      });
   socket.add([255, 12, 0, 11, 0, 9, 34, 82, 69, 70, 84, 65, 72, 73, 76]);
   });
  }
  </code></pre>