Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. public void sendDataToServer(final String response) {
  2. OutputStream os = clientSocket.getOutputStream();
  3. DataOutputStream dos = new DataOutputStream(new GZIPOutputStream(os));
  4. byte[] buff = response.getBytes("UTF-8");
  5. dos.writeInt(buff.length);
  6. dos.write(buff);
  7. dos.flush();
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement