|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream net.sf.basedb.core.plugin.ExportOutputStream
public class ExportOutputStream
An output stream used for immediate download from export plugins. The plugin
must implement the ImmediateDownloadExporter
interface. If the plugin
wants to set mime type, character set, content length and filename it must do
so before it starts writing data to the output stream.
This class is intended to be subclassed by implementations more
suitable for the type of download. For example the ServletExportOutputStream
implements direct download
from web clients and the FileExportOutputStream
implements
direct download to the BASE file system.
Field Summary | |
---|---|
private OutputStream |
out
|
Constructor Summary | |
---|---|
ExportOutputStream(OutputStream out)
Create a new export stream. |
Method Summary | |
---|---|
void |
close()
|
void |
flush()
|
File |
getFile()
If the export stream is going to a BASE File object,
use this method to access it. |
void |
setCharacterSet(String charset)
Do nothing should be overridden by subclasses. |
void |
setContentLength(long contentLength)
Do nothing. |
void |
setFilename(String name)
Do nothing. |
void |
setMimeType(String mimeType)
Do nothing. |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final OutputStream out
Constructor Detail |
---|
public ExportOutputStream(OutputStream out)
out
- The underlying stream to write the exported data to
NullPointerException
- If out is nullMethod Detail |
---|
public void close() throws IOException
close
in interface Closeable
close
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void setContentLength(long contentLength)
public void setMimeType(String mimeType)
public void setCharacterSet(String charset)
public void setFilename(String name)
public File getFile()
File
object,
use this method to access it. This class always return null,
subclasses may override this method.
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |