Package org.jboss.shrinkwrap.api.asset

Examples of org.jboss.shrinkwrap.api.asset.Asset.openStream()


            FileOutputStream fos = null;
            InputStream is = null;
            try
            {
               fos = new FileOutputStream(target);
               is = asset.openStream();
               Streams.write(is, fos);
            }
            finally
            {
               Streams.closeQuietly(is);
View Full Code Here


  private InputStream loadFromArchive(String name) {
    Asset asset = archive.get( name ).getAsset();

    InputStream in;
    if ( asset instanceof FileAsset ) {
      in = asset.openStream();
    }
    else if ( asset instanceof ByteArrayAsset ) {
      in = asset.openStream();
    }
    else {
View Full Code Here

    InputStream in;
    if ( asset instanceof FileAsset ) {
      in = asset.openStream();
    }
    else if ( asset instanceof ByteArrayAsset ) {
      in = asset.openStream();
    }
    else {
      throw new RuntimeException( "Unsupported asset type " + asset.toString() );
    }
View Full Code Here

                    if (asset == null)
                    {
                        return null;
                    }

                    final InputStream input = asset.openStream();
                    synchronized (this)
                    {
                        openedStreams.add(input);
                    }
                    return input;
View Full Code Here

                    // no-op
                }

                @Override
                public InputStream getInputStream() throws IOException {
                    final InputStream input = asset.openStream();
                    final Collection<Closeable> c = closeables.get(arName);
                    c.add(input);
                    return input;
                }
            };
View Full Code Here

                    // no-op
                }

                @Override
                public InputStream getInputStream() throws IOException {
                    final InputStream input = asset.openStream();
                    final Collection<Closeable> c = closeables.get(arName);
                    c.add(input);
                    return input;
                }
            };
View Full Code Here

            FileOutputStream fos = null;
            InputStream is = null;
            try
            {
               fos = new FileOutputStream(target);
               is = asset.openStream();
               Streams.write(is, fos);
            }
            finally
            {
               Streams.closeQuietly(is);
View Full Code Here

                    // no-op
                }

                @Override
                public InputStream getInputStream() throws IOException {
                    final InputStream input = asset.openStream();
                    final Collection<Closeable> c = closeables.get(arName);
                    c.add(input);
                    return input;
                }
            };
View Full Code Here

                }

                @Override
                public InputStream getInputStream() throws IOException {
                    final Asset asset = node.getAsset();
                    final InputStream input = asset.openStream();
                    synchronized (closeables) {
                        closeables.add(input);
                    }
                    return input;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.