Package com.volantis.mcs.migrate.impl.framework.io

Examples of com.volantis.mcs.migrate.impl.framework.io.RestartInputStream


        // Create a version of the input which we can read multiple times.
        // This is required because the content recognisers and the first step
        // may all need to read the input data. Note that currently the
        // implementation is very simple and reads the entire input into a
        // byte array. Improving this implementation may speed the performance.
        RestartInputStream restartInput = new RestartInputStream(input);

        // Ask the resource recogniser to see if can recognise the input
        // resource. This will throw an exception if we get duplicate matches
        // as that indicates an error in the configuration which must be solved
        // before we migrate30 the resource in question.
        Match match = resourceIdentifier.identifyResource(meta,
                restartInput);

        // Restart the input since the recogniser will have already
        // consumed it.
        restartInput.restart();

        // If we found a recognition match...
        if (match != null) {
            // ... then try and run the migration using the match.
View Full Code Here


        mockInputMetadata = new InputMetadataMock("path", expectations);

        mockTypeIdentifier = new TypeIdentifierMock("type", expectations);

        input = new RestartInputStream(new InputStream() {
            public int read() throws IOException {

                return -1;
            }
        });
View Full Code Here

TOP

Related Classes of com.volantis.mcs.migrate.impl.framework.io.RestartInputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.