Next: Class ZipFileRepo
Up: Design
Previous: Class StructuredFileRepo
Contents
Class TempFileBuilder
TempFileBuilder is a utility class. It provided a number of
static utility methods to assist in creating temporary files. Instances
of this class cannot be created because its constructor is private.
TempFileBuilder is used by ZipFileRepo (section
4.12) and TempFileRepo (section
4.13).
Figure 18:
Class TempFileBuilder
|
|
As figure 18 shows, TempFileBuilder
provides the following methods:
- buildFromInputStream
- Creates a temporary directory and copies
the content of the input stream to a file under that directory.
- buildFromZipInputStream
- Creates a temporary directory and
unpacks the contents of the input stream under that directory.
- copy
- Copies data from an input stream to a file.
- createTempDirectory
- Creates a temporary directory.
Temporary files and directories created by TempFileBuilder will be
removed from the file system when the JVM terminates.