core-it-support/core-it-wagon/src/main/java/org/apache/maven/wagon/providers/coreit/CoreItHttpWagon.java [46:127]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void get(String resourceName, File destination)
            throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
        InputData inputData = new InputData();

        Resource resource = new Resource(resourceName);

        fireGetInitiated(resource, destination);

        inputData.setResource(resource);

        fillInputData(inputData);

        InputStream is = inputData.getInputStream();

        if (is == null) {
            throw new TransferFailedException(
                    getRepository().getUrl() + " - Could not open input stream for resource: '" + resource + "'");
        }

        createParentDirectories(destination);

        getTransfer(inputData.getResource(), destination, is);
    }

    public boolean getIfNewer(String resourceName, File destination, long timestamp)
            throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
        return false;
    }

    public void put(File source, String resourceName)
            throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
        OutputData outputData = new OutputData();

        Resource resource = new Resource(resourceName);

        firePutInitiated(resource, source);

        outputData.setResource(resource);

        fillOutputData(outputData);

        OutputStream os = outputData.getOutputStream();

        if (os == null) {
            throw new TransferFailedException(
                    getRepository().getUrl() + " - Could not open output stream for resource: '" + resource + "'");
        }

        putTransfer(outputData.getResource(), source, os, true);
    }

    public void closeConnection() throws ConnectionException {
        File f = new File("target/wagon-data");
        try {
            f.getParentFile().mkdirs();
            f.createNewFile();
        } catch (IOException e) {
            throw new ConnectionException(e.getMessage(), e);
        }
    }

    public void fillInputData(InputData inputData) throws TransferFailedException, ResourceDoesNotExistException {
        try {
            String resName = inputData.getResource().getName();
            InputStream is = null;
            if (resName.endsWith(".sha1")) {
                is = new ByteArrayInputStream("c96e29be962f9d8123b584b8f51d66b347d268d4".getBytes("UTF-8"));
            } else if (resName.endsWith(".md5")) {
                is = new ByteArrayInputStream("d2b637ab8965308490bc6482c860dfc5".getBytes("UTF-8"));
            } else {
                is = new ByteArrayInputStream("<metadata />".getBytes("UTF-8"));
            }
            inputData.setInputStream(is);
        } catch (IOException e) {
            throw new TransferFailedException("Broken JVM", e);
        }
    }

    public void fillOutputData(OutputData outputData) throws TransferFailedException {
        Properties props = new Properties();
        if (getRepository().getPermissions() != null) {
            String dirPerms = getRepository().getPermissions().getDirectoryMode();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



core-it-support/core-it-wagon/src/main/java/org/apache/maven/wagon/providers/coreit/CoreItWagon.java [47:129]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void get(String resourceName, File destination)
            throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
        InputData inputData = new InputData();

        Resource resource = new Resource(resourceName);

        fireGetInitiated(resource, destination);

        inputData.setResource(resource);

        fillInputData(inputData);

        InputStream is = inputData.getInputStream();

        if (is == null) {
            throw new TransferFailedException(
                    getRepository().getUrl() + " - Could not open input stream for resource: '" + resource + "'");
        }

        createParentDirectories(destination);

        getTransfer(inputData.getResource(), destination, is);
    }

    public boolean getIfNewer(String resourceName, File destination, long timestamp)
            throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
        return false;
    }

    public void put(File source, String resourceName)
            throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
        OutputData outputData = new OutputData();

        Resource resource = new Resource(resourceName);

        firePutInitiated(resource, source);

        outputData.setResource(resource);

        fillOutputData(outputData);

        OutputStream os = outputData.getOutputStream();

        if (os == null) {
            throw new TransferFailedException(
                    getRepository().getUrl() + " - Could not open output stream for resource: '" + resource + "'");
        }

        putTransfer(outputData.getResource(), source, os, true);
    }

    public void closeConnection() throws ConnectionException {
        File f = new File("target/wagon-data");
        try {
            f.getParentFile().mkdirs();
            f.createNewFile();
        } catch (IOException e) {
            throw new ConnectionException(e.getMessage(), e);
        }
    }

    public void fillInputData(InputData inputData) throws TransferFailedException, ResourceDoesNotExistException {
        try {
            String resName = inputData.getResource().getName();
            InputStream is = null;
            if (resName.endsWith(".sha1")) {
                is = new ByteArrayInputStream("c96e29be962f9d8123b584b8f51d66b347d268d4".getBytes("UTF-8"));
            } else if (resName.endsWith(".md5")) {
                is = new ByteArrayInputStream("d2b637ab8965308490bc6482c860dfc5".getBytes("UTF-8"));
            } else {
                is = new ByteArrayInputStream("<metadata />".getBytes("UTF-8"));
            }
            inputData.setInputStream(is);
        } catch (IOException e) {
            throw new TransferFailedException("Broken JVM", e);
        }
    }

    public void fillOutputData(OutputData outputData) throws TransferFailedException {
        Properties props = new Properties();

        if (getRepository().getPermissions() != null) {
            String dirPerms = getRepository().getPermissions().getDirectoryMode();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



