/** * $RCSfile $ * $Revision $ * $Date $ * * Copyright (C) 1999-2005 Jive Software. All rights reserved. * This software is the proprietary information of Jive Software. Use is subject to license terms. */packageorg.jivesoftware.wildfire.filetransfer;importjava.io.OutputStream;importjava.io.IOException;importjava.io.DataOutputStream;importjava.util.concurrent.atomic.AtomicLong;/** * An output stream which tracks the amount of bytes transfered by proxy sockets. */publicclassProxyOutputStreamextendsDataOutputStream{staticAtomicLongamountTransfered=newAtomicLong(0);publicProxyOutputStream(OutputStreamout){super(out);}publicsynchronizedvoidwrite(byteb[],intoff,intlen)throwsIOException{super.write(b,off,len);amountTransfered.addAndGet(len);}}