org.apache.cocoon.components.source.impl
Class PartSource
java.lang.Object
org.apache.cocoon.components.source.impl.PartSource
- All Implemented Interfaces:
- Source
public class PartSource
- extends Object
- implements Source
Implementation of a Source
that gets its content
from a PartOnDisk or PartInMemory held in the Request when
a file is uploaded.
- Version:
- CVS $Id: PartSource.html 1304258 2012-03-23 10:09:27Z ilgrosso $
- Author:
- Paul Crabtree
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PartSource
public PartSource(String uri,
Map objectModel)
throws MalformedURLException,
SourceException
- Builds a PartSource given an URI.
- Parameters:
uri
- e.g., upload://formField1
- Throws:
SourceException
MalformedURLException
getInputStream
public InputStream getInputStream()
throws IOException,
SourceNotFoundException
- Specified by:
getInputStream
in interface Source
- Throws:
IOException
SourceNotFoundException
- See Also:
Source.getInputStream()
getMimeType
public String getMimeType()
- Specified by:
getMimeType
in interface Source
- See Also:
Source.getMimeType()
exists
public boolean exists()
- Specified by:
exists
in interface Source
- Returns:
- true if the resource exists.
getURI
public String getURI()
- Specified by:
getURI
in interface Source
getScheme
public String getScheme()
- Specified by:
getScheme
in interface Source
getValidity
public SourceValidity getValidity()
- Specified by:
getValidity
in interface Source
refresh
public void refresh()
- Specified by:
refresh
in interface Source
- See Also:
Source.refresh()
getContentLength
public long getContentLength()
- Specified by:
getContentLength
in interface Source
- See Also:
Source.getContentLength()
getLastModified
public long getLastModified()
- Specified by:
getLastModified
in interface Source
- See Also:
Source.getLastModified()
getPart
public Part getPart()
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.