public interface ScannerListener
Scanner.| Modifier and Type | Method and Description |
|---|---|
boolean |
onAccept(String name)
Accept a scanned resource.
|
void |
onProcess(String name,
InputStream in)
Process a scanned resource.
|
boolean onAccept(String name)
This method will be invoked by a Scanner to ascertain if the
listener accepts the resource for processing. If acceptable then
the Scanner will then invoke the
onProcess(java.lang.String, java.io.InputStream) method.
name - the resource name.void onProcess(String name, InputStream in) throws IOException
This method will be invoked after the listener has accepted the resource.
name - the resource name.in - the input stream of the resourceIOException - if an error occurs when processing the resource.Copyright © 2016 Oracle Corporation. All rights reserved.