public class GenericDiskDataWriterFactory<T> extends AbstractDataWriterFactory<T>
Modifier and Type | Field and Description |
---|---|
private java.io.File |
dir |
Constructor and Description |
---|
GenericDiskDataWriterFactory(java.io.File dir,
FilenameGenerator<T> filenameGenerator)
Create a new factory that creates files in the given
directory.
|
Modifier and Type | Method and Description |
---|---|
protected java.io.OutputStream |
getOutputStream(java.lang.String filename)
Create a new file in the data directory with the given file
name.
|
createDataWriter, isUnique
public GenericDiskDataWriterFactory(java.io.File dir, FilenameGenerator<T> filenameGenerator) throws java.io.IOException
dir
- The directory to create files injava.lang.NullPointerException
- If the dir parameter is nulljava.io.FileNotFoundException
- If the given path is not an existing directoryjava.io.IOException
protected java.io.OutputStream getOutputStream(java.lang.String filename) throws java.io.IOException
getOutputStream
in class AbstractDataWriterFactory<T>
java.io.IOException
- If the file already exists or if it can't
be created