Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.optional.jlink

public Class ClassNameReader

Additional top-level class in compilation unit: ConstantPool.

extends Object
Class Inheritance
Imports
java.io.DataInput, .DataInputStream, .IOException, .InputStream

Provides a quick and dirty way to determine the true name of a class given just an InputStream. Reads in just enough to perform this minimal task only.

Field Summary

Modifier and TypeField and Description
private static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

the name of the class
getClassName
(InputStream
an InputStream value
input
)

Get the class name of a class in an input stream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CLASS_MAGIC_NUMBERback to summary
private static final int CLASS_MAGIC_NUMBER

Constructor Detail

ClassNameReaderback to summary
public ClassNameReader()

Method Detail

getClassNameback to summary
public static String getClassName(InputStream input) throws IOException

Get the class name of a class in an input stream.

Parameters
input:InputStream

an InputStream value

Returns:String

the name of the class

Exceptions
IOException:
if an error occurs