- public synchronized File getFile(final String luid) {
- File file = lib.getFile(luid);
- if (file == null) {
- final File[] tmp = new File[1];
- try {
- new ConnectActionClient(host, port, true, null) {
- @Override
- public void action(Version serverVersion) throws Exception {
- try {
- Object rep = send("GET_STORY " + luid);
- Story story = (Story) rep;
- if (story != null) {
- lib.save(story, luid, null);
- tmp[0] = lib.getFile(luid);
- }
- } catch (Exception e) {
- Instance.syserr(e);
- }
- }
- }.connect();
- } catch (IOException e) {
- Instance.syserr(e);
- }
-
- file = tmp[0];
- }
-
- if (file != null) {
- MetaData meta = getInfo(luid);
- metas.add(meta);
- }
-
- return file;
+ public BufferedImage getCover(final String luid) {
+ return this.<BufferedImage> getRemoteObject("GET_COVER " + luid);