public static OutputStream wrapOutputStream(OutputStream originalStream) {
        return new OutputStreamWrapper(originalStream);
    }
Wraps the specified output stream to count the number of bytes that were written.

@param originalStream the output stream to wrap.
@return The wrapped output stream over the original stream.
xmppserver/src/main/java/org/jivesoftware/openfire/net/ServerTrafficCounter.java