/plugins/FTP/tags/release-0-2-2/com/fooware/net/FtpOutputStream.java

# · Java · 48 lines · 15 code · 11 blank · 22 comment · 0 complexity · ebd565efa134bb8c6d3ff6f54237c311 MD5 · raw file

  1. /*************************************************************************
  2. * Copyright (C) 1998, Chris Cheetham, fooware *
  3. * Distributed under the GNU General Public License *
  4. * http://www.fsf.org/copyleft/gpl.html *
  5. *************************************************************************/
  6. package com.fooware.net;
  7. import java.io.FilterOutputStream;
  8. import java.io.OutputStream;
  9. import java.io.IOException;
  10. /**
  11. * @author <A HREF="mailto:cheetham@fooware.com">Chris Cheetham</A>
  12. * @version $Revision: 1842 $
  13. **/
  14. public class FtpOutputStream extends FilterOutputStream {
  15. //
  16. // constructors
  17. //
  18. /**
  19. * Contruct an FtpOutputStream for the specified FtpClient.
  20. **/
  21. FtpOutputStream(OutputStream ostr, FtpClient client) throws IOException {
  22. super(ostr);
  23. this.client = client;
  24. }
  25. /**
  26. * Close the underlying Writer and signal the FtpClient that
  27. * Writer processing has completed.
  28. **/
  29. public void close() throws IOException {
  30. super.close();
  31. client.closeTransferSocket();
  32. }
  33. //
  34. // member variables
  35. //
  36. private FtpClient client;
  37. }