FSDataInputStream widgetStream = fs.open(fstatus[i].getPath());
byte[] buffer = new byte[(int)size];
widgetStream.readFully(buffer);
widgetStream.close();
try {
WidgetBean widget = new WidgetBean(new JSONObject(new String(buffer)));
catalog.addCatalog(widget);
list.put(widget.getId(),widget);
} catch (Exception e) {
log.error(ExceptionUtil.getStackTrace(e));
}
}
}