|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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()
AbstractStreamSourcetrue if getInputStream() succeeds.
Subclasses can provide a more efficient implementation.
exists in interface WriteableSourceexists in class AbstractStreamSourceprotected boolean isHTMLContent()
true if the file name ends with ".htm" or ".html".
isHTMLContent in class AbstractStreamSourcepublic String getSystemId()
getSystemId in interface Source
public InputStream getInputStream()
throws IOException,
ProcessingException
getInputStream in interface SourceIOException
ProcessingExceptionpublic long getLastModified()
AbstractStreamSource
getLastModified in interface SourcegetLastModified in class AbstractStreamSourcepublic long getContentLength()
AbstractStreamSource
getContentLength in interface SourcegetContentLength in class AbstractStreamSource
public OutputStream getOutputStream()
throws IOException,
ProcessingException
getOutputStream in interface WriteableSourceConcurrentModificationException - if another thread is currently
writing to this file.
IOException
ProcessingExceptionpublic boolean canCancel(OutputStream stream)
false. To be redefined by implementations that support
cancel().
canCancel in interface WriteableSourcecanCancel in class AbstractStreamWriteableSource
public void cancel(OutputStream stream)
throws Exception
cancel in interface WriteableSourcecancel in class AbstractStreamWriteableSourceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||