|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.components.source.AbstractStreamSource org.apache.cocoon.components.source.AbstractStreamWriteableSource org.apache.cocoon.components.source.FileSource
public class FileSource
A org.apache.cocoon.environment.WriteableSource
for 'file:/' system IDs.
Field Summary | |
---|---|
protected File |
file
Deprecated. The underlying file. |
Fields inherited from class org.apache.cocoon.components.source.AbstractStreamSource |
---|
manager, transformerFactory |
Constructor Summary | |
---|---|
FileSource(String url,
ComponentManager manager)
Deprecated. Create a file source from a 'file:' url and a component manager. |
Method Summary | |
---|---|
boolean |
canCancel(OutputStream stream)
Deprecated. Always return false . |
void |
cancel(OutputStream stream)
Deprecated. Cancels the output stream. |
boolean |
exists()
Deprecated. Returns true if getInputStream() succeeds. |
long |
getContentLength()
Deprecated. Override this method to set the Content Length |
InputStream |
getInputStream()
Deprecated. Get the input stream for this source. |
long |
getLastModified()
Deprecated. Override this method to set the Last Modification date |
OutputStream |
getOutputStream()
Deprecated. Get an output stream to write to this source. |
String |
getSystemId()
Deprecated. Return the unique identifer for this source |
protected boolean |
isHTMLContent()
Deprecated. Returns true if the file name ends with ".htm" or ".html". |
Methods inherited from class org.apache.cocoon.components.source.AbstractStreamWriteableSource |
---|
canCancel, cancel, getContentHandler |
Methods inherited from class org.apache.cocoon.components.source.AbstractStreamSource |
---|
getInputSource, recycle, refresh, toSAX |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.cocoon.environment.WriteableSource |
---|
canCancel, cancel, getContentHandler |
Methods inherited from interface org.apache.cocoon.environment.ModifiableSource |
---|
refresh |
Methods inherited from interface org.apache.cocoon.environment.Source |
---|
getInputSource |
Methods inherited from interface org.apache.avalon.excalibur.pool.Recyclable |
---|
recycle |
Methods inherited from interface org.apache.excalibur.xml.sax.XMLizable |
---|
toSAX |
Field Detail |
---|
protected File file
Constructor Detail |
---|
public FileSource(String url, ComponentManager manager)
Method Detail |
---|
public boolean exists()
AbstractStreamSource
true
if getInputStream()
succeeds.
Subclasses can provide a more efficient implementation.
exists
in interface WriteableSource
exists
in class AbstractStreamSource
protected boolean isHTMLContent()
true
if the file name ends with ".htm" or ".html".
isHTMLContent
in class AbstractStreamSource
public String getSystemId()
getSystemId
in interface Source
public InputStream getInputStream() throws IOException, ProcessingException
getInputStream
in interface Source
IOException
ProcessingException
public long getLastModified()
AbstractStreamSource
getLastModified
in interface Source
getLastModified
in class AbstractStreamSource
public long getContentLength()
AbstractStreamSource
getContentLength
in interface Source
getContentLength
in class AbstractStreamSource
public OutputStream getOutputStream() throws IOException, ProcessingException
getOutputStream
in interface WriteableSource
ConcurrentModificationException
- if another thread is currently
writing to this file.
IOException
ProcessingException
public boolean canCancel(OutputStream stream)
false
. To be redefined by implementations that support
cancel()
.
canCancel
in interface WriteableSource
canCancel
in class AbstractStreamWriteableSource
public void cancel(OutputStream stream) throws Exception
cancel
in interface WriteableSource
cancel
in class AbstractStreamWriteableSource
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |