code: private static Map<String, Attachment> buildAttachmentDB() throws  IOException {
  		Map<String, Attachment> map = new TreeMap<String, Attachment>(String.CASE_INSENSITIVE_ORDER);
  
  		if (MonomerStoreConfiguration.getInstance().isUseExternalAttachments()) {
  
  			map = AttachmentLoader.loadAttachments(
  					new FileInputStream(MonomerStoreConfiguration.getInstance().getExternalAttachmentsPath()));
  		} else {
  
  			InputStream in = MonomerFactory.class.getResourceAsStream(ATTACHMENTS_RESOURCE);
  			map = AttachmentLoader.loadAttachments(in);
  		}
  
  		return map;
  
  	}
docs: builds attachment db from default file or external file
  @return attachment db
  @throws IOException if the given attachments can not be read or the file doesn't exist or the attachment is not valid