org.apache.cocoon.servlet.multipart
Class PartInMemory

java.lang.Object
  extended by org.apache.cocoon.servlet.multipart.Part
      extended by org.apache.cocoon.servlet.multipart.PartInMemory
All Implemented Interfaces:
Disposable

public class PartInMemory
extends Part

This class represents a file part parsed from a http post stream.

Version:
CVS $Id: PartInMemory.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Jeroen ter Voorde

Field Summary
 
Fields inherited from class org.apache.cocoon.servlet.multipart.Part
headers
 
Constructor Summary
PartInMemory(Map headers, byte[] bytes)
          Constructor PartInMemory
 
Method Summary
 void dispose()
          Clean the byte array content buffer holding part data
 String getFileName()
          Returns the filename
 InputStream getInputStream()
          Returns a (ByteArray)InputStream containing the file data
 int getSize()
          Returns the filesize in bytes
 
Methods inherited from class org.apache.cocoon.servlet.multipart.Part
copyToFile, copyToSource, disposeWithRequest, getHeaders, getMimeType, getUploadName, isRejected, setDisposeWithRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartInMemory

public PartInMemory(Map headers,
                    byte[] bytes)
Constructor PartInMemory

Method Detail

getFileName

public String getFileName()
Returns the filename

Specified by:
getFileName in class Part

getSize

public int getSize()
Returns the filesize in bytes

Specified by:
getSize in class Part

getInputStream

public InputStream getInputStream()
                           throws IOException
Returns a (ByteArray)InputStream containing the file data

Specified by:
getInputStream in class Part
Throws:
IOException

dispose

public void dispose()
Clean the byte array content buffer holding part data

Specified by:
dispose in interface Disposable
Specified by:
dispose in class Part


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.