Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void sendDataToServer(final String response) {
- OutputStream os = clientSocket.getOutputStream();
- DataOutputStream dos = new DataOutputStream(new GZIPOutputStream(os));
- byte[] buff = response.getBytes("UTF-8");
- dos.writeInt(buff.length);
- dos.write(buff);
- dos.flush();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement