/** * Return the last modified date. */ public long getLastModified() { if (!connected) { // Try to connect (silently) try { connect(); } catch (IOException e) { } } if (attributes == null) return 0; Attribute lastModified = attributes.get(ResourceAttributes.LAST_MODIFIED); if (lastModified != null) { try { Date lmDate = (Date) lastModified.get(); return lmDate.getTime(); } catch (Exception e) { } } return 0; }
/** * Return the last modified date. */ public long getLastModified() { if (!connected) { // Try to connect (silently) try { connect(); } catch (IOException e) { } } if (attributes == null) return 0; Attribute lastModified = attributes.get(ResourceAttributes.LAST_MODIFIED); if (lastModified != null) { try { Date lmDate = (Date) lastModified.get(); return lmDate.getTime(); } catch (Exception e) { } } return 0; }
/** * Return the last modified date. */ @Override public long getLastModified() { if (!connected) { // Try to connect (silently) try { connect(); } catch (IOException e) { // Ignore } } if (attributes == null) return 0; Attribute lastModified = attributes.get(ResourceAttributes.LAST_MODIFIED); if (lastModified != null) { try { Date lmDate = (Date) lastModified.get(); return lmDate.getTime(); } catch (Exception e) { // Ignore } } return 0; }
/** * Get object content. */ @Override public Object getContent() throws IOException { if (!connected) connect(); if (resource != null) return getInputStream(); if (collection != null) return collection; if (object != null) return object; throw new FileNotFoundException(); }
/** * Get object content. */ public Object getContent() throws IOException { if (!connected) connect(); if (resource != null) return getInputStream(); if (collection != null) return collection; if (object != null) return object; throw new FileNotFoundException(); }
/** * Get object content. */ public Object getContent() throws IOException { if (!connected) connect(); if (resource != null) return getInputStream(); if (collection != null) return collection; if (object != null) return object; throw new FileNotFoundException(); }
/** * Get object content. */ @Override public Object getContent() throws IOException { if (!connected) connect(); if (resource != null) return getInputStream(); if (collection != null) return collection; if (object != null) return object; throw new FileNotFoundException(); }
/** * Get object content. */ @Override public Object getContent() throws IOException { if (!connected) connect(); if (resource != null) return getInputStream(); if (collection != null) return collection; if (object != null) return object; throw new FileNotFoundException(); }
/** * Get input stream. */ public InputStream getInputStream() throws IOException { if (!connected) connect(); if (resource == null) { throw new FileNotFoundException(); } else { // Reopen resource try { resource = (Resource) context.lookup(localPath); } catch (NamingException e) { } } return (resource.streamContent()); }
/** * Get input stream. */ public InputStream getInputStream() throws IOException { if (!connected) connect(); if (resource == null) { throw new FileNotFoundException(); } else { // Reopen resource try { resource = (Resource) context.lookup(localPath); } catch (NamingException e) { } } return (resource.streamContent()); }
/** * Get object content. */ @Override public Object getContent() throws IOException { if (!connected) connect(); if (resource != null) return getInputStream(); if (collection != null) return collection; if (object != null) return object; throw new FileNotFoundException( getURL() == null ? "null" : getURL().toString()); }
/** * Get object content. */ @Override public Object getContent() throws IOException { if (!connected) connect(); if (resource != null) return getInputStream(); if (collection != null) return collection; if (object != null) return object; throw new FileNotFoundException( getURL() == null ? "null" : getURL().toString()); }
connect(); } catch (IOException e) {
connect(); } catch (IOException e) {
/** * Get input stream. */ @Override public InputStream getInputStream() throws IOException { if (!connected) connect(); if (resource == null) { throw new FileNotFoundException(); } // Reopen resource try { resource = (Resource) context.lookup(getURL().getFile()); } catch (NamingException e) { // Ignore } return (resource.streamContent()); }
/** * Get input stream. */ @Override public InputStream getInputStream() throws IOException { if (!connected) connect(); if (resource == null) { throw new FileNotFoundException(); } // Reopen resource try { resource = (Resource) context.lookup(getURL().getFile()); } catch (NamingException e) { // Ignore } return (resource.streamContent()); }
/** * Get input stream. */ @Override public InputStream getInputStream() throws IOException { if (!connected) connect(); if (resource == null) { throw new FileNotFoundException(); } // Reopen resource try { resource = (Resource) context.lookup(getURL().getFile()); } catch (NamingException e) { // Ignore } return (resource.streamContent()); }
/** * Get input stream. */ @Override public InputStream getInputStream() throws IOException { if (!connected) connect(); if (resource == null) { throw new FileNotFoundException( getURL() == null ? "null" : getURL().toString()); } // Reopen resource try { resource = (Resource) context.lookup( URLDecoder.decode(getURL().getFile(), "UTF-8")); } catch (NamingException e) { // Ignore } return (resource.streamContent()); }
/** * Get input stream. */ @Override public InputStream getInputStream() throws IOException { if (!connected) connect(); if (resource == null) { throw new FileNotFoundException( getURL() == null ? "null" : getURL().toString()); } // Reopen resource try { resource = (Resource) context.lookup( URL_DECODER.convert(getURL().getFile(), false)); } catch (NamingException e) { // Ignore } return (resource.streamContent()); }