|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
org.torweg.pulse.util.streamscanner.OutputStreamScannerChain
public final class OutputStreamScannerChain
is a filter chain for user supplied files.
The OutputStreamScannerChain is applied for both form and WebDAV
based file uploads and can of course be used in your own code.
Note: the OutputStreamScannerChain is
not thread-safe.
The filter chain is configured in the main config directory ( WEB-INF/conf) by org.torweg.pulse.util.streamscanner.OutputStreamScannerChain.xml.
| Field Summary |
|---|
| Fields inherited from class java.io.FilterOutputStream |
|---|
out |
| Constructor Summary | |
|---|---|
OutputStreamScannerChain(java.io.OutputStream out,
java.lang.String ct, User u)
creates a new OutputStreamScannerChain for the given OutputStream. |
|
| Method Summary | |
|---|---|
void |
close()
closes the scanner chain and its underlying stream. |
void |
write(byte[] b)
filters and then writes the given byte array to the underlying OutputStream. |
void |
write(byte[] b,
int off,
int len)
scans and then writes len bytes from the specified byte array starting at offset off to the underlying OutputStream. |
void |
write(int b)
scans and then writes the given byte to the underlying OutputStream. |
| Methods inherited from class java.io.FilterOutputStream |
|---|
flush |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OutputStreamScannerChain(java.io.OutputStream out,
java.lang.String ct, User u)
OutputStreamScannerChain for the given OutputStream.
out - the OutputStream to be scannedct - the content-type of the scanned streamu - the user| Method Detail |
|---|
public void write(byte[] b)
throws StreamException, InacceptableStreamException
OutputStream.
write in class java.io.FilterOutputStreamb - the byte array to be scanned and written
StreamException - on errors writing to the underlying stream
InacceptableStreamException - if the scanned stream is not acceptable (e.g. it contains a
virus)
public void write(byte[] b,
int off,
int len)
throws StreamException, InacceptableStreamException
OutputStream.
write in class java.io.FilterOutputStreamb - the byte arrayoff - the offsetlen - the length
StreamException - on errors writing to the underlying stream
InacceptableStreamException - if the filtered stream is not acceptable (e.g. it contains a
virus)
public void write(int b)
throws StreamException, InacceptableStreamException
OutputStream.
write in class java.io.FilterOutputStreamb - the byte
StreamException - on errors writing to the underlying stream
InacceptableStreamException - if the filtered stream is not acceptable (e.g. it contains a
virus)
public void close()
throws java.io.IOException, InacceptableStreamException
close in interface java.io.Closeableclose in class java.io.FilterOutputStreamjava.io.IOException - on errors closing the underlying stream or any of the filters
InacceptableStreamException - if the filtered stream is not acceptable (e.g. it contains a
virus)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||