net.sf.jmatchparser.util.split
Class FileOutputStreamFactory

java.lang.Object
  extended by net.sf.jmatchparser.util.split.FileOutputStreamFactory
All Implemented Interfaces:
SplitOutputStream.StreamFactory

public class FileOutputStreamFactory
extends Object
implements SplitOutputStream.StreamFactory

Output stream factory that creates file output streams.


Constructor Summary
FileOutputStreamFactory(File directory, Format filenameFormat, int firstNumber)
          Create a new file output stream factory that creates files in a given directory in a given format.
FileOutputStreamFactory(File directory, String filenameFormat, int firstNumber)
          Create a new file output stream factory that creates files in a given directory in a given format.
 
Method Summary
 OutputStream createOutputStream(int index)
          Create a new stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileOutputStreamFactory

public FileOutputStreamFactory(File directory,
                               String filenameFormat,
                               int firstNumber)
Create a new file output stream factory that creates files in a given directory in a given format.

Parameters:
directory - Directory to put the files into.
filenameFormat - Format string used to format the file name, as defined by MessageFormat
firstNumber - Number to use for the first stream

FileOutputStreamFactory

public FileOutputStreamFactory(File directory,
                               Format filenameFormat,
                               int firstNumber)
Create a new file output stream factory that creates files in a given directory in a given format.

Parameters:
directory - Directory to put the files into.
filenameFormat - Format used to format the file name
firstNumber - Number to use for the first stream
Method Detail

createOutputStream

public OutputStream createOutputStream(int index)
                                throws FileNotFoundException
Description copied from interface: SplitOutputStream.StreamFactory
Create a new stream.

Specified by:
createOutputStream in interface SplitOutputStream.StreamFactory
Parameters:
index - Zero-based index of the stream
Throws:
FileNotFoundException


Copyright © 2011. All Rights Reserved.