org.eobjects.datacleaner.repository
Interface RepositoryFile

All Superinterfaces:
HasName, RepositoryNode, Serializable

public interface RepositoryFile
extends RepositoryNode

Represents a file in the Repository.


Nested Class Summary
static class RepositoryFile.Type
          Represents the main file types in the repository.
 
Method Summary
 long getLastModified()
          Gets the last modified timestamp.
 RepositoryFile.Type getType()
          Gets the type of the file.
 InputStream readFile()
          Deprecated. use readFile(Action) or readFile(Func) instead.
 void readFile(Action<InputStream> readCallback)
          Opens up an InputStream to read from the file, and allows a callback to perform writing actions on it.
<E> E
readFile(Func<InputStream,E> readCallback)
          Opens up an InputStream to read from the file, and allows a callback function to perform writing actions on it and return the function's result.
 void writeFile(Action<OutputStream> writeCallback)
          Opens up an OutputStream to write to the file, and allows a callback to perform writing actions on it.
 
Methods inherited from interface org.eobjects.datacleaner.repository.RepositoryNode
delete, getName, getParent, getQualifiedPath
 

Method Detail

readFile

@Deprecated
InputStream readFile()
Deprecated. use readFile(Action) or readFile(Func) instead.

Opens up an InputStream to read from the file.

Returns:
an InputStream to read from the file.

writeFile

void writeFile(Action<OutputStream> writeCallback)
Opens up an OutputStream to write to the file, and allows a callback to perform writing actions on it.

Parameters:
writeCallback - a callback which should define what to write to the file.

readFile

void readFile(Action<InputStream> readCallback)
Opens up an InputStream to read from the file, and allows a callback to perform writing actions on it.

Parameters:
readCallback -

readFile

<E> E readFile(Func<InputStream,E> readCallback)
Opens up an InputStream to read from the file, and allows a callback function to perform writing actions on it and return the function's result.

Parameters:
readCallback -
Returns:
the result of the function

getType

RepositoryFile.Type getType()
Gets the type of the file.

Returns:
the type of the file.

getLastModified

long getLastModified()
Gets the last modified timestamp.

Returns:


Copyright © 2012 Human Inference. All Rights Reserved.