net.sourceforge.cobertura.instrument

Class Archive


(package private) class Archive
extends java.lang.Object

This class represents an archive within an archive.
Author:
John Lewis

Field Summary

private byte[]
bytes
private CoberturaFile
file
private boolean
modified

Constructor Summary

Archive(CoberturaFile file, byte[] bytes)
Create an object that holds a buffer to an archive that is within a parent archive.

Method Summary

(package private) byte[]
getBytes()
Return the contents of this archive.
(package private) CoberturaFile
getCoberturaFile()
Returns the parent archive that contains this archive.
(package private) InputStream
getInputStream()
Return an input stream for the contents of this archive (the child).
(package private) boolean
isModified()
Return true if this archive has been modified (instrumented).
(package private) void
setModifiedBytes(byte[] bytes)
Set this archive's bytes after they have been modified via instrumentation.

Field Details

bytes

private byte[] bytes

file

private CoberturaFile file

modified

private boolean modified

Constructor Details

Archive

(package private)  Archive(CoberturaFile file,
                           byte[] bytes)
Create an object that holds a buffer to an archive that is within a parent archive.
Parameters:
file - The parent archive on the hard drive that holds the child archive.
bytes - The contents of the child archive.

Method Details

getBytes

(package private)  byte[] getBytes()
Return the contents of this archive.
Returns:
A byte array with the contents of this archive.

getCoberturaFile

(package private)  CoberturaFile getCoberturaFile()
Returns the parent archive that contains this archive.
Returns:
A CoberturaFile representing the parent archive.

getInputStream

(package private)  InputStream getInputStream()
Return an input stream for the contents of this archive (the child).
Returns:
An InputStream for the contents.

isModified

(package private)  boolean isModified()
Return true if this archive has been modified (instrumented).
Returns:
true if modified.

setModifiedBytes

(package private)  void setModifiedBytes(byte[] bytes)
Set this archive's bytes after they have been modified via instrumentation.
Parameters:
bytes - The new contents of the archive (instrumented).