code: public static boolean addFilelistener(String pResourcename, String pListenerPath)
          throws FileNotFoundException, IOException, ClassNotFoundException {
          mFilelistenerToPaths = new HashMap<String, String>();
  
          File listenerFilePaths = new File(StorageManager.ROOT_PATH + File.separator + "mapping.data");
  
          getFileListenersFromSystem(listenerFilePaths);
  
          mFilelistenerToPaths.put(pResourcename, pListenerPath);
  
          ByteArrayDataOutput output = ByteStreams.newDataOutput();
          for (Entry<String, String> e : mFilelistenerToPaths.entrySet()) {
              output.write((e.getKey() + "\n").getBytes());
              output.write((e.getValue() + "\n").getBytes());
          }
  
          java.nio.file.Files.write(listenerFilePaths.toPath(), output.toByteArray(),
              StandardOpenOption.TRUNCATE_EXISTING);
  
          return true;
      }
docs: Add a new filelistener to the system.
  
  @param pResourcename
  @param pListenerPath
  @return return true if there has been a success.
  @throws FileNotFoundException
  @throws IOException
  @throws ClassNotFoundException