@Override @SuppressWarnings("unchecked") public void read(String path, ValueCallback callback) { try { Object result = read(path); if (result instanceof MultiResult) { MultiResult multiResult = (MultiResult) result; for (Object singleResult : multiResult.getResults()) { callback.onResult(singleResult); } } else { callback.onResult(result); } } catch (IOException e) { throw new ValueReadingException(e.getMessage(), e); } catch (RuntimeException e) { throw new ValueReadingException(e.getMessage(), e); } }
@Override @SuppressWarnings("unchecked") public void read(String path, ValueCallback callback) { try { Object result = read(path); if (result instanceof MultiResult) { MultiResult multiResult = (MultiResult) result; for (Object singleResult : multiResult.getResults()) { callback.onResult(singleResult); } } else { callback.onResult(result); } } catch (IOException e) { throw new ValueReadingException(e.getMessage(), e); } catch (RuntimeException e) { throw new ValueReadingException(e.getMessage(), e); } }