de.unido.ls5.eti.client
Interface VirtualFile

All Known Implementing Classes:
ByteArrayVirtualFile, FileVirtualFile

public interface VirtualFile

This interface is used by every jETI related API to represent the tool's input/output files. It hides the fact how the data of this file is stored and simply provides the InputStream to read it. An implementation could for example store the data in a real File object or in a byte array.

Rating red

Method Summary
 String getFilename()
          As the implementation is independent from real files, it must have a file name that is handled separately.
 InputStream getInputStream()
          Provides the InputStream where the data of the represented file can be read from.
 String toString()
          The implementing class is forced to override Object.toString() to produce some usable debug data, such as size, path, ...
 

Method Detail

getInputStream

InputStream getInputStream()
                           throws IOException
Provides the InputStream where the data of the represented file can be read from.

Returns:
the input stream to the represented file
Throws:
IOException - may be thrown if the underlying implementation uses some I/O to read the data from.

getFilename

String getFilename()
As the implementation is independent from real files, it must have a file name that is handled separately. This filename is used by jETI to identify the file's name within the jETI-file-context.

Returns:
The name of this VirtualFile

toString

String toString()
The implementing class is forced to override Object.toString() to produce some usable debug data, such as size, path, ...

Overrides:
toString in class Object
Returns:
A String representation of the file containing debug information