javazoom.upload.parsing
Class CfuUploadFile

java.lang.Object
  extended byjavazoom.upload.UploadFile
      extended byjavazoom.upload.parsing.CfuUploadFile
All Implemented Interfaces:
java.io.Serializable

public class CfuUploadFile
extends UploadFile

UploadFile implementation for matching to Commons-FileUpload parser.

See Also:
Serialized Form

Constructor Summary
CfuUploadFile()
           
CfuUploadFile(org.apache.commons.fileupload.FileItem tmpCfuItem)
          Construtor.
 
Method Summary
 org.apache.commons.fileupload.FileItem getCfuFileItem()
          Gets underlying Commons-FileUpload File Item.
 byte[] getData()
          Return binary data.
 java.io.InputStream getInpuStream()
          Gets InputStream from temporary file.
 void reset()
          Deletes temporary file.
protected  void saveAs(java.io.File file)
          Dumps InputStream in a file.
 
Methods inherited from class javazoom.upload.UploadFile
getContentType, getFileName, getFileSize, setContentType, setFileName, setFileSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CfuUploadFile

public CfuUploadFile()

CfuUploadFile

public CfuUploadFile(org.apache.commons.fileupload.FileItem tmpCfuItem)
Construtor.

Parameters:
tmpCfuItem - FileItem
Method Detail

getData

public byte[] getData()
Return binary data.

Specified by:
getData in class UploadFile
Returns:
Array of byte

reset

public void reset()
Deletes temporary file.

Specified by:
reset in class UploadFile

getInpuStream

public java.io.InputStream getInpuStream()
Gets InputStream from temporary file.

Specified by:
getInpuStream in class UploadFile
Returns:
InputStream

saveAs

protected void saveAs(java.io.File file)
               throws java.io.IOException
Description copied from class: UploadFile
Dumps InputStream in a file.

Overrides:
saveAs in class UploadFile
Parameters:
file - File
Throws:
java.io.IOException

getCfuFileItem

public org.apache.commons.fileupload.FileItem getCfuFileItem()
Gets underlying Commons-FileUpload File Item.

Returns:
FileItem