@Override protected void readResult(InputStream in) throws IOException { super.readResult(in); String key = getClass().getSimpleName(); knownValues.put(key, rawData); knownBuffers.put(key, new ArrayList<Integer>(buffer)); }
@Override public void run(InputStream in, OutputStream out) throws IOException, InterruptedException { String key = getClass().getSimpleName(); if (knownValues.containsKey(key)) { rawData = knownValues.get(key); buffer = knownBuffers.get(key); performCalculations(); } else { super.run(in, out); } }