codesize
Class Codesize

java.lang.Object
  extended by codesize.Codesize

public class Codesize
extends Object

Codesize is a tool for calculating the code size of a Java class file or Java archive (JAR).

Author:
Christian D. Schnell (original), Flemming N. Larsen (contributor)

Nested Class Summary
static class Codesize.Item
          Container which keeps information extracted by Codesize.
 
Method Summary
static void dump(List items, PrintStream target)
          Dumps a list of Codesize items to the specified PrintStream.
static void main(String[] args)
          The main entry for running the Codesize tool from the command line.
static Codesize.Item processClassFile(File classFile)
          Extracts code size information for a class file.
static Codesize.Item processDirectory(File directory)
          Extracts code size information for a directory.
static Codesize.Item processZipFile(File zipFile)
          Extracts code size information for a zip file.
static Codesize.Item processZipFile(File zipFile, ZipInputStream inputStream)
          Extracts code size information for a zip file given a ZipInputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

processClassFile

public static Codesize.Item processClassFile(File classFile)
Extracts code size information for a class file.

Parameters:
classFile - the filename of the class file
Returns:
the extracted Codesize information for the class file

processDirectory

public static Codesize.Item processDirectory(File directory)
Extracts code size information for a directory.

Parameters:
directory - the filename of the directory
Returns:
the extracted Codesize information about the directory

processZipFile

public static Codesize.Item processZipFile(File zipFile)
Extracts code size information for a zip file.

Parameters:
zipFile - the filename of the zip file
Returns:
the extracted Codesize information for the zip file

processZipFile

public static Codesize.Item processZipFile(File zipFile,
                                           ZipInputStream inputStream)
                                    throws IOException
Extracts code size information for a zip file given a ZipInputStream.

Parameters:
zipFile - the filename of the zip file
inputStream - the input stream of the zip file
Returns:
the extracted Codesize information for the zip file
Throws:
IOException

dump

public static void dump(List items,
                        PrintStream target)
Dumps a list of Codesize items to the specified PrintStream.

Parameters:
items - the list of items to print out
target - the PrintStream to print the items to

main

public static void main(String[] args)
The main entry for running the Codesize tool from the command line.

Parameters:
args - the arguments given from the command line