Class FileContent

Object
  extended by FileContent

public class FileContent
extends Object

Class to hold in memory details of a file sent through the CGI request, including its contents and whatever other attributes were dispatched.


Field Summary
 NameValue[] attributes
          Any attributes of the file received from the browser.
 byte[] content
          The contents of the file, as a byte array.
 String filename
          The name of the file.
 String type
          Content-type as received from the browser.
 
Constructor Summary
FileContent(String name, byte[] cont, NameValue[] attr, String t)
          Constructor for a FileContent object.
 
Method Summary
 String toString()
          Provide a text representation of the main attributes of the file.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

attributes

public NameValue[] attributes
Any attributes of the file received from the browser. Normally, this will be null.


content

public byte[] content
The contents of the file, as a byte array.


filename

public String filename
The name of the file.


type

public String type
Content-type as received from the browser. Typically, this will be "application/octet-stream".

Constructor Detail

FileContent

public FileContent(String name,
                   byte[] cont,
                   NameValue[] attr,
                   String t)
Constructor for a FileContent object.

Parameters:
name - The name of the file received.
cont - The file contents, as an array of bytes.
attr - Attributes of the file, as name-value pairs.
t - The type of the file, as described in the transmission.
Method Detail

toString

public String toString()
Provide a text representation of the main attributes of the file.

Overrides:
toString in class Object