org.apache.ftpserver
Class FtpWriter

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

public class FtpWriter
extends java.io.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(java.net.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(java.lang.String str)
          Write a string
 void write(java.lang.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(java.net.Socket soc,
                 FtpConfig config)
          throws java.io.IOException
Constructor - set the actual writer object

Throws:
java.io.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 java.io.IOException
Write a character array.

Overrides:
write in class java.io.Writer
Throws:
java.io.IOException

write

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

Specified by:
write in class java.io.Writer
Throws:
java.io.IOException

write

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

Overrides:
write in class java.io.Writer
Throws:
java.io.IOException

write

public void write(java.lang.String str)
           throws java.io.IOException
Write a string

Overrides:
write in class java.io.Writer
Throws:
java.io.IOException

write

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

Overrides:
write in class java.io.Writer
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Close writer.

Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Writer
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Flush the stream

Specified by:
flush in interface java.io.Flushable
Specified by:
flush in class java.io.Writer
Throws:
java.io.IOException


Copyright © 2001-2009 Codehaus. All Rights Reserved.