org.apache.ftpserver
Class FtpWriter

java.lang.Object
  extended by java.io.Writer
      extended by org.apache.ftpserver.FtpWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class FtpWriter
extends Writer

Writer object used by the server. It has the spying capability.

Author:
Rana Bhattacharyya

Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
FtpWriter(Socket soc, FtpConfig config)
          Constructor - set the actual writer object
 
Method Summary
 void close()
          Close writer.
 void flush()
          Flush the stream
 SpyConnectionInterface getSpyObject()
          Get the spy object to get what the user is writing.
 void setSpyObject(SpyConnectionInterface spy)
          Set the connection spy object.
 void write(char[] cbuf)
          Write a character array.
 void write(char[] cbuf, int off, int len)
          Write a portion of character array
 void write(int c)
          Write a single character
 void write(String str)
          Write a string
 void write(String str, int off, int len)
          Write a portion of the string.
 
Methods inherited from class java.io.Writer
append, append, append
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FtpWriter

public FtpWriter(Socket soc,
                 FtpConfig config)
          throws IOException
Constructor - set the actual writer object

Throws:
IOException
Method Detail

getSpyObject

public SpyConnectionInterface getSpyObject()
Get the spy object to get what the user is writing.


setSpyObject

public void setSpyObject(SpyConnectionInterface spy)
Set the connection spy object.


write

public void write(char[] cbuf)
           throws IOException
Write a character array.

Overrides:
write in class Writer
Throws:
IOException

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException
Write a portion of character array

Specified by:
write in class Writer
Throws:
IOException

write

public void write(int c)
           throws IOException
Write a single character

Overrides:
write in class Writer
Throws:
IOException

write

public void write(String str)
           throws IOException
Write a string

Overrides:
write in class Writer
Throws:
IOException

write

public void write(String str,
                  int off,
                  int len)
           throws IOException
Write a portion of the string.

Overrides:
write in class Writer
Throws:
IOException

close

public void close()
           throws IOException
Close writer.

Specified by:
close in interface Closeable
Specified by:
close in class Writer
Throws:
IOException

flush

public void flush()
           throws IOException
Flush the stream

Specified by:
flush in interface Flushable
Specified by:
flush in class Writer
Throws:
IOException


Copyright © 2001-2012 Codehaus. All Rights Reserved.