Java Code Examples for com.alibaba.com.caucho.hessian.io.Hessian2Output#close()

The following examples show how to use com.alibaba.com.caucho.hessian.io.Hessian2Output#close() . 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 vote down vote up
@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 vote down vote up
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: X509Encryption.java    From dubbo-hessian-lite with Apache License 2.0 5 votes vote down vote up
@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 4
Source File: HessianUtil.java    From j360-dubbo-app-all with Apache License 2.0 5 votes vote down vote up
private static void closeQuietly(Hessian2Output hessian2Output) {
    try {
        if (hessian2Output != null) {
            hessian2Output.close();
        }
    } catch (IOException e) {
        logger.warn("close hessian2Output failed");
    }
}
 
Example 5
Source File: X509Encryption.java    From dubbo3 with Apache License 2.0 5 votes vote down vote up
public void close()
        throws IOException {
    Hessian2Output out = _out;
    _out = null;

    if (out != null) {
        _cipherOut.close();
        _bodyOut.close();

        out.writeInt(0);
        out.completeEnvelope();
        out.close();
    }
}