rheise.jftpd
Class StreamTransmissionMode

java.lang.Object
  |
  +--rheise.jftpd.TransmissionMode
        |
        +--rheise.jftpd.StreamTransmissionMode

public class StreamTransmissionMode
extends TransmissionMode

This class handles transmissions using STREAM mode. The data is sent as a continuous stream of data.


Field Summary
private static int BUFSIZ
           
 
Fields inherited from class rheise.jftpd.TransmissionMode
code, STREAM, transmissionModes
 
Constructor Summary
(package private) StreamTransmissionMode()
           
 
Method Summary
 void receiveFile(java.net.Socket s, java.io.OutputStream out, Representation representation)
          Reads data from the given socket and converts it from the specified representation to local representation, writing the result to a file via "out".
 void sendFile(java.io.InputStream in, java.net.Socket s, Representation representation)
          Reads the contents of the file from "in", and writes the data to the given socket using the specified representation.
 
Methods inherited from class rheise.jftpd.TransmissionMode
get, getCode
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

BUFSIZ

private static final int BUFSIZ
Constructor Detail

StreamTransmissionMode

StreamTransmissionMode()
Method Detail

sendFile

public void sendFile(java.io.InputStream in,
                     java.net.Socket s,
                     Representation representation)
              throws java.io.IOException
Reads the contents of the file from "in", and writes the data to the given socket using the specified representation.
Overrides:
sendFile in class TransmissionMode

receiveFile

public void receiveFile(java.net.Socket s,
                        java.io.OutputStream out,
                        Representation representation)
                 throws java.io.IOException
Reads data from the given socket and converts it from the specified representation to local representation, writing the result to a file via "out".
Overrides:
receiveFile in class TransmissionMode