private void linkStatic(Map<String, String> methodMap,
                            Map<String, String> fieldMap)
    throws IOException, LinkError {
        String line;
        while((line = in.readLine()) != null) {
            String[] args = line.trim().split("\\s+");
            if(args[0].equals("invokestatic")
                    && externMethods.contains(args[1]))
                printInvokeStatic(args[1], methodMap);
            else if(args[0].equals("getstatic")
                    && externFields.contains(args[1] + " " + args[2]))
                printGetStatic(args[1] + " " + args[2], fieldMap);
            else if(args[0].equals("CLASSFORMETHOD")
                    && externMethods.contains(args[1]))
                printClassForMethod(args[1], methodMap);
            else
                out.write(line + '\n');
        }
    }