|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IStreamScanner
is an interface for input stream scanners, such as virus scanners etc.
Note: the implementations IStreamScanner are
not thread-safe.
Implementations that need the StreamScannerConfig of the chain for
additional configurations, must implement Configurable.
| Method Summary | |
|---|---|
void |
close()
called upon close of the scanned stream to signal the end of the scanning. |
void |
scan(byte[] b)
scans the given byte array; mimics OutputStream.write(byte[]). |
void |
scan(int b)
scans the given byte. |
void |
setContentType(java.lang.String t)
sets the content-type of the scanned content, as this might be important for some of the scanners, e.g. protection against the MIME-sniffing capabilities of Internet Explorer. |
void |
setUser(User u)
sets the user for the scanner. |
void |
shutdown()
unconditionally frees all resources of the IStreamScanner
catching all Exceptions. |
| Method Detail |
|---|
void setContentType(java.lang.String t)
t - the content-typevoid setUser(User u)
u - the user
void scan(byte[] b)
throws InacceptableStreamException
OutputStream.write(byte[]).
b - the byte array to be scanned
InacceptableStreamException - if the stream is unacceptable due to this scanner
void scan(int b)
throws InacceptableStreamException
b - the byte
InacceptableStreamException - if the stream is unacceptable due to this scanner
void close()
throws InacceptableStreamException, StreamException
InacceptableStreamException - if the stream is unacceptable due to this scanner
StreamException - on errors closing the scannervoid shutdown()
IStreamScanner
catching all Exceptions.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||