rheise.jftpd
Class AsciiRepresentation

java.lang.Object
  |
  +--rheise.jftpd.Representation
        |
        +--rheise.jftpd.AsciiRepresentation

public class AsciiRepresentation
extends Representation

This class converts data streams to and from ASCII representation. New lines are represented as "\r\n".


Fields inherited from class rheise.jftpd.Representation
ASCII, code, IMAGE, name, representations
 
Constructor Summary
(package private) AsciiRepresentation()
           
 
Method Summary
 java.io.InputStream getInputStream(java.net.Socket socket)
           
 java.io.OutputStream getOutputStream(java.net.Socket socket)
           
 long sizeOf(java.io.File file)
           
 
Methods inherited from class rheise.jftpd.Representation
get, getCode, getName
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

AsciiRepresentation

AsciiRepresentation()
Method Detail

getInputStream

public java.io.InputStream getInputStream(java.net.Socket socket)
                                   throws java.io.IOException
Overrides:
getInputStream in class Representation
Returns:
an input stream to read data from the socket. Data will be translated from ASCII representation to local representation.

getOutputStream

public java.io.OutputStream getOutputStream(java.net.Socket socket)
                                     throws java.io.IOException
Overrides:
getOutputStream in class Representation
Returns:
an output stream to write data to the socket. Data will be translated from local representation to ASCII representation.

sizeOf

public long sizeOf(java.io.File file)
            throws java.io.IOException
Overrides:
sizeOf in class Representation
Returns:
the size that the specified file would have in this representation.