rheise.jftpd
Class ImageRepresentation

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

public class ImageRepresentation
extends Representation

This class converts data streams to and from IMAGE representation.


Fields inherited from class rheise.jftpd.Representation
ASCII, code, IMAGE, name, representations
 
Constructor Summary
(package private) ImageRepresentation()
           
 
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

ImageRepresentation

ImageRepresentation()
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 IMAGE 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 IMAGE 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.