Esempio n. 1
0
 @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));
 }
Esempio n. 2
0
 @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);
   }
 }