code: public static InputStream checkout(String url, File directory, String user, String pwd) throws IOException {
          if (!directory.exists() && !directory.mkdirs()) {
              throw new IOException("Could not create new working copy directory at " + directory);
          }
  
          CommandLine cmdLine = new CommandLine(SVN_CMD);
          cmdLine.addArgument("co");
          addDefaultArguments(cmdLine, user, pwd);
          cmdLine.addArgument(url);
          cmdLine.addArgument(directory.toString());
  
          // allow up to two hour for new checkouts
          return ExecutionHelper.getCommandResult(cmdLine, directory, -1, 2 * 60 * 60 * 1000);
      }
docs: Performs a SVN Checkout of the given URL to the given directory
  
  @param url       The SVN URL that should be checked out
  @param directory The location where the working copy is created.
  @param user The SVN user or null if the default user from the machine should be used
  @param pwd  The SVN password or null if the default user from the machine should be used   @return The contents of the file.
  @return A stream with output from the command, should be closed by the caller
  @throws IOException Execution of the SVN sub-process failed or the
  sub-process returned a exit value indicating a failure