Package org.codehaus.plexus.util

Examples of org.codehaus.plexus.util.StringInputStream


    {
        StreamingWagon wagon = new TestWagon()
        {
            public void fillInputData( InputData inputData )
            {
                inputData.setInputStream( new StringInputStream( "" ) );
                inputData.getResource().setLastModified( resourceTime );
            }
        };

        wagon.connect( repository );
View Full Code Here


        };

        wagon.connect( repository );
        try
        {
            wagon.putFromStream( new StringInputStream( content ), "resource" );
            assertEquals( content, out.toString() );
        }
        finally
        {
            wagon.disconnect();
View Full Code Here

        };

        wagon.connect( repository );
        try
        {
            wagon.putFromStream( new StringInputStream( content ), "resource", content.length(), lastModified );
            assertEquals( content, out.toString() );
        }
        finally
        {
            wagon.disconnect();
View Full Code Here

            try
            {
                String contents = getKnownHostsProvider().getContents();
                if ( contents != null )
                {
                    sch.setKnownHosts( new StringInputStream( contents ) );
                }
            }
            catch ( JSchException e )
            {
                // continue without known_hosts
View Full Code Here

        if ( content != null )
        {
            resource.setContentLength( content.length() );
            resource.setLastModified( System.currentTimeMillis() );

            inputData.setInputStream( new StringInputStream( content ) );
        }
        else
        {
            throw new ResourceDoesNotExistException( "No content provided for " + resource.getName() );
        }
View Full Code Here

            try
            {
                String contents = knownHostsProvider.getContents();
                if ( contents != null )
                {
                    sch.setKnownHosts( new StringInputStream( contents ) );
                }
            }
            catch ( JSchException e )
            {
                // continue without known_hosts
View Full Code Here

    {
        String conf = IOUtil.toString( getClass().getResourceAsStream( "/conf/application.xml" ) );

        conf = StringUtils.replace( conf, "../../../../../continuum-web/src/main/resources", "webapp" );

        return new StringInputStream( conf );
    }
View Full Code Here

            }

            try
            {
                Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder()
                    .parse( new StringInputStream( pluginConf.toString() ) );

                XObject obj = XPathAPI.eval( doc, "//configuration/" + optionName );

                if ( StringUtils.isNotEmpty( obj.toString() ) )
                {
View Full Code Here

  public final static void main(String[] args) {
    StringBuffer builder = new StringBuffer();
    builder.append("<!ENTITY foo SYSTEM \"bar\">\n");
    builder.append("<!ENTITY bar SYSTEM \"foo\">\n");

    StringInputStream in = new StringInputStream(builder.toString());

    try {
      EntityFileParser.parse(in,
                             new EntityVisitor() {
          public void visitSystemEntity(String name, String systemId) {
View Full Code Here

            try
            {
                String contents = getKnownHostsProvider().getContents();
                if ( contents != null )
                {
                    sch.setKnownHosts( new StringInputStream( contents ) );
                }
            }
            catch ( JSchException e )
            {
                // continue without known_hosts
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.util.StringInputStream

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.