|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.aries.unittest.fixture.ArchiveFixture.AbstractFixture
org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture
public static class ArchiveFixture.ZipFixture
Base fixture for any kind of zip archive. Zip archives can contain any number of child archives given by an archive type and a path. The order in which these child archives are added is important because it will be the order in which they are added to the zip.
| Nested Class Summary | |
|---|---|
protected static class |
ArchiveFixture.ZipFixture.ChildFixture
|
| Field Summary | |
|---|---|
protected byte[] |
bytes
|
protected List<ArchiveFixture.ZipFixture.ChildFixture> |
children
|
| Constructor Summary | |
|---|---|
protected |
ArchiveFixture.ZipFixture(ArchiveFixture.ZipFixture parent)
|
| Method Summary | |
|---|---|
ArchiveFixture.ZipFixture |
binary(String path,
InputStream input)
Create a binary file with the content from the input stream |
ArchiveFixture.ZipFixture |
binary(String path,
String resourcePath)
Create a binary file that is populated from content on the classloader |
ArchiveFixture.FileFixture |
file(String path)
Create an empty file fixture at the given path. |
ArchiveFixture.ZipFixture |
file(String path,
String content)
Create a complete child file fixture at the given path and with the content. |
InputStream |
getInputStream()
|
ArchiveFixture.ZipFixture |
jar(String path)
Create a child jar fixture at the given path. |
ArchiveFixture.ManifestFixture |
manifest()
Create a manifest fixture at the given path. |
protected void |
writeAllEntries(ZipOutputStream zout)
Add all entries to the ZipOutputStream |
void |
writeOut(OutputStream out)
Write the physical representation of the fixture to the given OutputStream |
ArchiveFixture.ZipFixture |
zip(String path)
Create a child zip fixture at the given target. |
| Methods inherited from class org.apache.aries.unittest.fixture.ArchiveFixture.AbstractFixture |
|---|
end |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<ArchiveFixture.ZipFixture.ChildFixture> children
protected byte[] bytes
| Constructor Detail |
|---|
protected ArchiveFixture.ZipFixture(ArchiveFixture.ZipFixture parent)
| Method Detail |
|---|
public ArchiveFixture.ZipFixture zip(String path)
path -
public ArchiveFixture.ZipFixture jar(String path)
path -
public ArchiveFixture.ZipFixture file(String path,
String content)
path - content -
public ArchiveFixture.FileFixture file(String path)
path -
public ArchiveFixture.ZipFixture binary(String path,
InputStream input)
throws IOException
path - input -
IOException
public ArchiveFixture.ZipFixture binary(String path,
String resourcePath)
throws IOException
path - resourcePath - Path that the resource can be found in the current classloader
IOExceptionpublic ArchiveFixture.ManifestFixture manifest()
protected void writeAllEntries(ZipOutputStream zout)
throws IOException
zout -
IOException
public void writeOut(OutputStream out)
throws IOException
ArchiveFixture.Fixture
IOException
public InputStream getInputStream()
throws IOException
IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||