244245246247248249250251252253254
encodeRequestData(channel, out, req.getData()); } out.flushBuffer(); bos.flush(); bos.close(); byte[] data = bos.toByteArray(); Bytes.int2bytes(data.length, header, 12); // write os.write(header); // write header. os.write(data); // write data.
283284285286287288289290291292293
else out.writeUTF(res.getErrorMessage()); out.flushBuffer(); bos.flush(); bos.close(); byte[] data = bos.toByteArray(); Bytes.int2bytes(data.length, header, 12); // write os.write(header); // write header. os.write(data); // write data. } catch (Throwable t) {