org.jboss.shrinkwrap.api.asset
Interface Asset

All Known Subinterfaces:
NamedAsset
All Known Implementing Classes:
ArchiveAsset, ByteArrayAsset, ClassAsset, ClassLoaderAsset, EmptyAsset, FileAsset, StringAsset, UrlAsset

public interface Asset

Represents byte-based content. Typically stored within a Node inside of an Archive under a context ArchivePath. May be added directly to all Archive types.

Author:
Aslak Knutsen, ALR

Method Summary
 InputStream openStream()
          Get a input stream for the resource content.
 

Method Detail

openStream

InputStream openStream()
Get a input stream for the resource content. The caller is responsible for closing the stream. If this returns null, this denotes that the Asset is to be viewed as a logical path (placeholder/directory) only with no backing content.

Returns:
A new open InputStream for each call, or null if this type simply represents a logical path within an Archive


Copyright © 2012 JBoss by Red Hat. All Rights Reserved.