code:     public void copyToRepository(InputStream source, int size, Artifact destination, FileWriteMonitor monitor) throws IOException {
          if(!destination.isResolved()) {
              throw new IllegalArgumentException("Artifact "+destination+" is not fully resolved");
          }
          // is this a writable repository
          if (!rootFile.canWrite()) {
              throw new IllegalStateException("This repository is not writable: " + rootFile.getAbsolutePath() + ")");
          }
  
          // where are we going to install the file
          File location = getLocation(destination);
  
          // assure that there isn't already a file installed at the specified location
          if (location.exists()) {
              throw new IllegalArgumentException("Destination " + location.getAbsolutePath() + " already exists!");
          }
  
          ArtifactTypeHandler typeHandler = typeHandlers.get(destination.getType());
          if (typeHandler == null) typeHandler = DEFAULT_TYPE_HANDLER;
          typeHandler.install(source, size, destination, monitor, location);
          
          if (destination.getType().equalsIgnoreCase("car")) {
              log.debug("Installed module configuration; id=" + destination + "; location=" + location);
          }
      }
  