ClassNameReader (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.taskdefs.optional.jlink, class: ClassNameReader

Package org.apache.tools.ant.taskdefs.optional.jlink

# Class ClassNameReader

java.lang.Object
org.apache.tools.ant.taskdefs.optional.jlink.ClassNameReader

public class ClassNameReader extends Object
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.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ClassNameReader()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `getClassName​(InputStream input)`
  Get the class name of a class in an input stream.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ClassNameReader

    public ClassNameReader()

- ## Method Details

  - ### getClassName

    public static String getClassName​(InputStream input) throws IOException
    Get the class name of a class in an input stream.
    Parameters:
      `input` - an `InputStream` value
    Returns:
      the name of the class
    Throws:
      `IOException` - if an error occurs