Package uk.ac.starlink.connect
Class ErrorLeaf
java.lang.Object
uk.ac.starlink.connect.ErrorLeaf
Dummy Leaf implmentation which describes an error condition.
- Since:
- 9 Sep 2005
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ErrorLeaf
Constructor.- Parameters:
parent
- leaf parenterr
- the throwable which this leaf reprsents
-
-
Method Details
-
getParent
Description copied from interface:Node
Returns the parent branch of this node. If this node is at the root of its tree, it will return null. -
getName
Description copied from interface:Node
Returns the name of this node. This should not be an entire pathname, that is, it should not include the name of its parent. -
getDataSource
Description copied from interface:Leaf
Returns a data source (replayable input stream) containing the data content of this leaf.- Specified by:
getDataSource
in interfaceLeaf
- Returns:
- data source
- Throws:
IOException
- if some other error occurs
-
getOutputStream
Description copied from interface:Leaf
Returns an output stream from this leaf. Whether the file named by this leaf already exists or not, the returned stream should effectively write to a new file (deleting an existing one if necessary).- Specified by:
getOutputStream
in interfaceLeaf
- Returns:
- output stream writing to the file named by this leaf
- Throws:
IOException
- if there's some error
-
toString
-