use of es.bsc.compss.types.annotations.parameter.Direction in project compss by bsc-wdc.
the class StreamRegistry method newFileOutputStream.
// FileOutputStream
public FileOutputStream newFileOutputStream(File file, boolean append) throws FileNotFoundException {
Direction direction = (append ? Direction.INOUT : Direction.OUT);
StreamList list = obtainList(file, direction);
FileOutputStream fos = new FileOutputStream(list.getRenaming(), append);
list.addStream(fos);
try {
list.addFD(fos.getFD());
} catch (IOException e) {
// We must go up as a FileNotFoundException, since it is the one that the application deals with
throw new FileNotFoundException("Loader - Error creating FileOutputStream for file " + file + lineSep + e.getMessage());
}
return fos;
}
use of es.bsc.compss.types.annotations.parameter.Direction in project compss by bsc-wdc.
the class StreamRegistry method newFileReader.
// FileReader
public FileReader newFileReader(File file) throws FileNotFoundException {
Direction direction = Direction.IN;
StreamList list = obtainList(file, direction);
FileReader fr = new FileReader(list.getRenaming());
list.addStream(fr);
return fr;
}
Aggregations