public static InputStream wrapInputStream(InputStream originalStream) {
        return new InputStreamWrapper(originalStream);
    }
Wraps the specified input stream to count the number of bytes that were read.

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