to.etc.net
Class MultipartFile

java.lang.Object
  extended by to.etc.net.MultipartFile

Deprecated.

@Deprecated
public abstract class MultipartFile
extends java.lang.Object

Used to provide file data for a file parameter to send to a HTTP server using MultipartPoster. This class has three methods to open, to get data and to close something which is to be send as a file. These methods are called as follows:

For an example implementation reading a file see aFileToSend in the MultipartPoster source.


Constructor Summary
MultipartFile()
          Deprecated.  
 
Method Summary
 void close()
          Deprecated.  
abstract  int getBytes(byte[] buf)
          Deprecated. This must provide data for the file to sent.
 int getSize()
          Deprecated.  
 void open()
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipartFile

public MultipartFile()
Deprecated. 
Method Detail

getBytes

public abstract int getBytes(byte[] buf)
                      throws java.io.IOException
Deprecated. 
This must provide data for the file to sent. It gets called with a buffer that should be filled with as much data as will fit. It will be called repeatedly until it returns -1.

Parameters:
buf - the buffer to copy data to,
Returns:
the #bytes put into the buffer, or -1 when done.
Throws:
java.io.IOException - on any error.

open

public void open()
          throws java.io.IOException
Deprecated. 
Throws:
java.io.IOException

getSize

public int getSize()
Deprecated. 

close

public void close()
Deprecated.