Java Code Examples for com.alibaba.com.caucho.hessian.io.Hessian2Output#writeInt()
The following examples show how to use
com.alibaba.com.caucho.hessian.io.Hessian2Output#writeInt() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: X509Signature.java From dubbo-hessian-lite with Apache License 2.0 | 6 votes |
@Override public void close() throws IOException { Hessian2Output out = _out; _out = null; if (out == null) return; _bodyOut.close(); byte[] sig = _mac.doFinal(); out.writeInt(1); out.writeString("signature"); out.writeBytes(sig); out.completeEnvelope(); out.close(); }
Example 2
Source File: X509Signature.java From dubbo3 with Apache License 2.0 | 6 votes |
public void close() throws IOException { Hessian2Output out = _out; _out = null; if (out == null) return; _bodyOut.close(); byte[] sig = _mac.doFinal(); out.writeInt(1); out.writeString("signature"); out.writeBytes(sig); out.completeEnvelope(); out.close(); }
Example 3
Source File: DubboResponseBody.java From brpc-java with Apache License 2.0 | 5 votes |
public byte[] encodeResponseBody() throws IOException { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(DubboConstants.DEFAULT_OUTPUT_BUFFER_SIZE); Hessian2Output hessian2Output = new Hessian2Output(outputStream); hessian2Output.setSerializerFactory(DubboRequestBody.SERIALIZER_FACTORY); hessian2Output.writeInt(responseType); hessian2Output.writeObject(result); if (attachments != null && attachments.size() > 0) { hessian2Output.writeObject(attachments); } hessian2Output.flush(); return outputStream.toByteArray(); }
Example 4
Source File: X509Encryption.java From dubbo-hessian-lite with Apache License 2.0 | 5 votes |
@Override public void close() throws IOException { Hessian2Output out = _out; _out = null; if (out != null) { _cipherOut.close(); _bodyOut.close(); out.writeInt(0); out.completeEnvelope(); out.close(); } }
Example 5
Source File: X509Encryption.java From dubbo3 with Apache License 2.0 | 5 votes |
public void close() throws IOException { Hessian2Output out = _out; _out = null; if (out != null) { _cipherOut.close(); _bodyOut.close(); out.writeInt(0); out.completeEnvelope(); out.close(); } }