Package uk.ac.starlink.connect

## Interface Leaf

All Superinterfaces:
  `Node`

All Known Implementing Classes:
  `ErrorLeaf`

    public interface Leaf
    extends Node

Represents a non-directory type file in a (possibly remote) filesystem.

Since:
  18 Feb 2005
Author:
  Mark Taylor (Starlink)

### Method Summary

All Methods Instance Methods Abstract Methods
`uk.ac.starlink.util.DataSource` `getDataSource()` Returns a data source (replayable input stream) containing the data content of this leaf.
`java.io.OutputStream` `getOutputStream()` Returns an output stream from this leaf.

### Methods inherited from interface uk.ac.starlink.connect.Node

`getName, getParent`

### Method Detail

#### getDataSource

    uk.ac.starlink.util.DataSource getDataSource()
                                          throws java.io.IOException

Returns a data source (replayable input stream) containing the data content of this leaf.

Returns:
  data source
Throws:
  `java.io.FileNotFoundException` - if the file named by this leaf does not exist
  `java.io.IOException` - if some other error occurs

#### getOutputStream

    java.io.OutputStream getOutputStream()
                                  throws java.io.IOException

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).

Returns:
  output stream writing to the file named by this leaf
Throws:
  `java.io.IOException` - if there's some error