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
public class FileExportOutputStream extends ExportOutputStream
An extension to theExportOutputStream
class which directs the output to aFile
in BASE.- Version:
- 2.2
- Author:
- nicklas
- See Also:
ImmediateDownloadExporter
- Last modified
- $Date: 2009-02-25 10:55:44 +0100 (on, 25 feb 2009) $
-
-
Field Summary
Fields Modifier and Type Field Description private File
file
private boolean
ignoreFilename
-
Constructor Summary
Constructors Constructor Description FileExportOutputStream(File file, boolean ignoreFilename)
Create a new export stream that writes the exported data to a file in the BASE filesystem
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
getFile()
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 Detail
-
file
private final File file
-
ignoreFilename
private final boolean ignoreFilename
-
-
Constructor Detail
-
FileExportOutputStream
public FileExportOutputStream(File file, boolean ignoreFilename)
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 Detail
-
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
public void setMimeType(String mimeType)
CallsFile.setMimeType(String)
- Overrides:
setMimeType
in classExportOutputStream
-
setCharacterSet
public void setCharacterSet(String charset)
- Overrides:
setCharacterSet
in classExportOutputStream
- Since:
- 2.9
-
setFilename
public void setFilename(String filename)
CallsFile.setName(String)
unless file names should be ignored.- Overrides:
setFilename
in classExportOutputStream
-
getFile
public File 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.
-
-