Package net.sf.basedb.util
Class FileExportOutputStream
java.lang.Object
java.io.OutputStream
net.sf.basedb.core.plugin.ExportOutputStream
net.sf.basedb.util.FileExportOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
An extension to the
ExportOutputStream
class which
directs the output to a File
in BASE.- Version:
- 2.2
- Author:
- nicklas
- See Also:
- Last modified
- $Date: 2009-02-25 10:55:44 +0100 (on, 25 feb 2009) $
-
Field Summary
-
Constructor Summary
ConstructorDescriptionFileExportOutputStream
(File file, boolean ignoreFilename) Create a new export stream that writes the exported data to a file in the BASE filesystem -
Method Summary
Modifier and TypeMethodDescriptiongetFile()
If the export stream is going to a BASEFile
object, use this method to access it.void
setCharacterSet
(String charset) void
setContentLength
(long contentLength) Ignored.void
setFilename
(String filename) CallsFile.setName(String)
unless file names should be ignored.void
setMimeType
(String mimeType) CallsFile.setMimeType(String)
Methods inherited from class net.sf.basedb.core.plugin.ExportOutputStream
close, flush, write, write, write
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
file
-
ignoreFilename
private final boolean ignoreFilename
-
-
Constructor Details
-
FileExportOutputStream
Create a new export stream that writes the exported data to a file in the BASE filesystem- Parameters:
file
- The file to write toignoreFilename
- If calls to thesetFilename(String)
should be ignored or not
-
-
Method Details
-
setContentLength
public void setContentLength(long contentLength) Ignored. File size is calculated from the number of bytes written to the file.- Overrides:
setContentLength
in classExportOutputStream
-
setMimeType
CallsFile.setMimeType(String)
- Overrides:
setMimeType
in classExportOutputStream
-
setCharacterSet
- Overrides:
setCharacterSet
in classExportOutputStream
- Since:
- 2.9
-
setFilename
CallsFile.setName(String)
unless file names should be ignored.- Overrides:
setFilename
in classExportOutputStream
-
getFile
Description copied from class:ExportOutputStream
If the export stream is going to a BASEFile
object, use this method to access it. This class always return null, subclasses may override this method.- Overrides:
getFile
in classExportOutputStream
- Returns:
- The file given to the constructor.
-