@Override
    public void write(byte[] buf, int off, int len) throws IOException {
      if (LOG.isDebugEnabled()) {
        LOG.debug("wrapping token of length:" + len);
      }

      // wrap with Crypto AES
      byte[] wrapped = cryptoAES.wrap(buf, off, len);
      DataOutputStream dob = new DataOutputStream(out);
      dob.writeInt(wrapped.length);
      dob.write(wrapped, 0, wrapped.length);
      dob.flush();
    }
Get a SASL wrapped OutputStream. Can be called only after saslConnect() has been called.
@return a SASL wrapped OutputStream
hbase-client/src/main/java/org/apache/hadoop/hbase/security/HBaseSaslRpcClient.java