public Throwable process(DataInputStream input, DataOutputStream output) throws IOException {
        byte type = input.readByte();
        String name = input.readUTF();
        if (type == 1) {
            InputStream stream = loader.getResourceAsStream(name);
            if (stream != null) {
                output.writeBoolean(true);
                writeAndCloseStream(output, stream);
            } else {
                output.writeBoolean(false);
            }
        } else if (type == 2) {
            Enumeration<URL> resources = loader.getResources(name);
            while (resources.hasMoreElements()) {
                output.writeBoolean(true);
                InputStream stream = resources.nextElement().openStream();
                writeAndCloseStream(output, stream);
            }
            output.writeBoolean(false);
        }
        output.flush();
        return null;
    }
Processes a request for one (code 1) or many (code 2) class loader
resources. The requested resources are sent preceded with a boolean
<code>true</code> value. If the resource was not found (code 1) or
when the last resource has been sent (code 2), a boolean
<code>false</code> value is sent instead.

@param name resource name
@throws IOException if the resource could not be sent
tika-core/src/main/java/org/apache/tika/fork/ClassLoaderResource.java