public static WritableByteChannel wrapWritableChannel(WritableByteChannel originalChannel) {
        return new WritableByteChannelWrapper(originalChannel);
    }
Wraps the specified writable channel to count the number of bytes that were written.

@param originalChannel the writable byte channel to wrap.
@return The wrapped writable channel over the original writable channel .
xmppserver/src/main/java/org/jivesoftware/openfire/net/ServerTrafficCounter.java