|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLoggable | +--org.apache.cocoon.components.source.AbstractStreamSource | +--org.apache.cocoon.components.source.AbstractStreamWriteableSource | +--org.apache.cocoon.components.source.FileSource
A WriteableSource
for 'file:/' system IDs.
Field Summary |
Fields inherited from class org.apache.cocoon.components.source.AbstractStreamSource |
manager, transformerFactory |
Constructor Summary | |
FileSource(java.lang.String url,
org.apache.avalon.framework.component.ComponentManager manager)
Create a file source from a 'file:' url and a component manager. |
Method Summary | |
boolean |
canCancel(java.io.OutputStream stream)
Always return false . |
void |
cancel(java.io.OutputStream stream)
Cancels the output stream. |
boolean |
exists()
Does this source actually exist ? |
long |
getContentLength()
Get the content length of the source or -1 if it is not possible to determine the length. |
java.io.InputStream |
getInputStream()
Get the input stream for this source. |
long |
getLastModified()
Get the last modification date of the source or 0 if it is not possible to determine the date. |
java.io.OutputStream |
getOutputStream()
Get an output stream to write to this source. |
java.lang.String |
getSystemId()
Return the unique identifer for this source |
protected boolean |
isHTMLContent()
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.AbstractLoggable |
getLogger, setLogger, 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.cocoon.xml.XMLizable |
toSAX |
Constructor Detail |
public FileSource(java.lang.String url, org.apache.avalon.framework.component.ComponentManager manager)
Method Detail |
public boolean exists()
WriteableSource
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 java.lang.String getSystemId()
getSystemId
in interface Source
public java.io.InputStream getInputStream() throws java.io.IOException, ProcessingException
getInputStream
in interface Source
java.io.IOException
ProcessingException
public long getLastModified()
Source
getLastModified
in interface Source
getLastModified
in class AbstractStreamSource
public long getContentLength()
Source
getContentLength
in interface Source
getContentLength
in class AbstractStreamSource
public java.io.OutputStream getOutputStream() throws java.io.IOException, ProcessingException
getOutputStream
in interface WriteableSource
java.util.ConcurrentModificationException
- if another thread is currently
writing to this file.
java.io.IOException
ProcessingException
public boolean canCancel(java.io.OutputStream stream)
false
. To be redefined by implementations that support
cancel()
.
canCancel
in interface WriteableSource
canCancel
in class AbstractStreamWriteableSource
public void cancel(java.io.OutputStream stream) throws java.lang.Exception
cancel
in interface WriteableSource
cancel
in class AbstractStreamWriteableSource
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |