Update of /cvsroot/mockobjects/mockobjects-java/src/jdk/common/alt/java/io
In directory sc8-pr-cvs1:/tmp/cvs-serv20181/src/jdk/common/alt/java/io
Added Files:
IOFactory.java IOFactoryImpl.java
Removed Files:
FileFactory.java FileFactoryImpl.java StreamFactory.java
StreamFactoryImpl.java
Log Message:
Replaced StreamFactory and FileFactory with IOFactory
Added implementations of File.exists, File.mkdirs and File.getParentFile
--- NEW FILE: IOFactory.java ---
package alt.java.io;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.OutputStream;
public interface IOFactory {
InputStream createInputStream(File aFile) throws FileNotFoundException;
OutputStream createOutputStream(File aFile) throws FileNotFoundException;
File createFile(String fileName);
}
--- NEW FILE: IOFactoryImpl.java ---
package alt.java.io;
import java.io.*;
public class IOFactoryImpl implements IOFactory {
public InputStream createInputStream(File aFile) throws FileNotFoundException {
return new FileInputStream(aFile.getRealFile());
}
public OutputStream createOutputStream(File aFile) throws FileNotFoundException {
return new FileOutputStream(aFile.getRealFile());
}
public File createFile(String fileName) {
return new FileImpl(fileName);
}
}
--- FileFactory.java DELETED ---
--- FileFactoryImpl.java DELETED ---
--- StreamFactory.java DELETED ---
--- StreamFactoryImpl.java DELETED ---
|