public class FileUDT
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
FileUDT(byte[] data,
java.lang.String filename,
java.lang.String encoding,
java.lang.String mimetype,
long size)
Default constructor that initialises the fields directly.
|
FileUDT(java.io.File file)
Default constructor that initialises the fields from the given file.
|
FileUDT(java.io.File file,
java.lang.String newFileName)
Default constructor that initialises the fields from the given file,
but using a different file name than actually provided by the file object.
|
FileUDT(java.io.InputStream xml) |
FileUDT(UDTValue xml) |
| Modifier and Type | Method and Description |
|---|---|
UDTValue |
getAsXML() |
byte[] |
getData() |
java.lang.String |
getEncoding() |
java.lang.String |
getFileName() |
java.lang.String |
getMimeType() |
long |
getSize() |
java.lang.String |
getSizeString() |
public FileUDT(java.io.File file)
file - The file that should be wrapped by this class.public FileUDT(java.io.File file,
java.lang.String newFileName)
file - The file that should be wrapped by this class.newFileName - The file name to be used in the file UDT.public FileUDT(java.io.InputStream xml)
xml - The input stream containing the xml that contains the
information for the file.public FileUDT(UDTValue xml)
xml - The UDTValue representing the xml that contains the information
for the file.public FileUDT(byte[] data,
java.lang.String filename,
java.lang.String encoding,
java.lang.String mimetype,
long size)
data - The actual data of the file.filename - The name of the file.encoding - The encoding of the file, may be null.mimetype - The mimetype of the file.size - The size of the file.public byte[] getData()
public java.lang.String getFileName()
public java.lang.String getEncoding()
public java.lang.String getMimeType()
public long getSize()
public java.lang.String getSizeString()
public UDTValue getAsXML()