private void setFileType(FileType type) { if (type != null && type != FileType.IMAGINARY) { try { name.setType(type); } catch (FileSystemException e) { throw new RuntimeException(e.getMessage()); } } this.type = type; }
public String getContentEncoding() { try { return content.getContentInfo().getContentEncoding(); } catch (FileSystemException e) { throw new RuntimeException(e.getMessage()); } }
public String getContentType() { try { return content.getContentInfo().getContentType(); } catch (FileSystemException e) { throw new RuntimeException(e.getMessage()); } }
/** * Called when the children of this file change. */ protected void onChildrenChanged(FileName child, FileType newType) { if (children != null && newType.equals(FileType.IMAGINARY)) { try { children.remove(UriParser.decode(child.getBaseName())); } catch (FileSystemException e) { throw new RuntimeException(e.getMessage()); } } else { // if child was added we have to rescan the children // TODO - get rid of this children = null; } }
/** * Implement Comparable * * @param obj another abstractfilename */ public int compareTo(Object obj) { final AbstractFileName name = (AbstractFileName) obj; int ret = getRootURI().compareTo(name.getRootURI()); if (ret != 0) { return ret; } // return absPath.compareTo(name.absPath); try { return getPathDecoded().compareTo(name.getPathDecoded()); } catch (FileSystemException e) { throw new RuntimeException(e.getMessage()); } }
throw new RuntimeException(fse.getMessage());
throw new SecurityException(fse.getMessage());