|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Source
that can be written to.
As far a possible, implementations should provide a kind of transaction or buffering of data written to the source. This is especially important in stream-based systems such as Cocoon where an error that occurs during the processing should lead to cancelling data written to the source.
This is the role of the canCancel(OutputStream)
and
cancel(OutputStream)
methods.
Method Summary | |
boolean |
canCancel(java.io.OutputStream stream)
Can the data sent to an OutputStream returned by
getOutputStream() be cancelled ? |
void |
cancel(java.io.OutputStream stream)
Cancel the data sent to an OutputStream returned by
getOutputStream() . |
void |
delete()
Delete the source |
java.io.OutputStream |
getOutputStream()
Return an OutputStream to write to. |
Methods inherited from interface org.apache.excalibur.source.Source |
exists, getContentLength, getInputStream, getLastModified, getMimeType, getScheme, getURI, getValidity, refresh |
Method Detail |
public java.io.OutputStream getOutputStream() throws java.io.IOException
OutputStream
to write to.
The returned stream must be closed or cancelled by the calling code.
java.io.IOException
public void delete() throws SourceException
SourceException
public boolean canCancel(java.io.OutputStream stream)
OutputStream
returned by
getOutputStream()
be cancelled ?
public void cancel(java.io.OutputStream stream) throws java.io.IOException
OutputStream
returned by
getOutputStream()
. Cancelling the stream will also close it.
After cancelling, the stream should no longer be used.
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |