javax.sound.sampled
Class Line.Info

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.sound.sampled.Line.Info
Direct Known Subclasses:
DataLine.Info sample code for javax.sound.sampled.DataLine.Info definition code for javax.sound.sampled.DataLine.Info , Port.Info sample code for javax.sound.sampled.Port.Info definition code for javax.sound.sampled.Port.Info
Enclosing interface:
Line sample code for javax.sound.sampled.Line definition code for javax.sound.sampled.Line

public static class Line.Info
extends Object sample code for java.lang.Object definition code for java.lang.Object

A Line.Info object contains information about a line. The only information provided by Line.Info itself is the Java class of the line. A subclass of Line.Info adds other kinds of information about the line. This additional information depends on which Line subinterface is implemented by the kind of line that the Line.Info subclass describes.

A Line.Info can be retrieved using various methods of the Line, Mixer, and AudioSystem interfaces. Other such methods let you pass a Line.Info as an argument, to learn whether lines matching the specified configuration are available and to obtain them.

Since:
1.3
See Also:
Line.getLineInfo() sample code for javax.sound.sampled.Line.getLineInfo() definition code for javax.sound.sampled.Line.getLineInfo() , Mixer.getSourceLineInfo() sample code for javax.sound.sampled.Mixer.getSourceLineInfo() definition code for javax.sound.sampled.Mixer.getSourceLineInfo() , Mixer.getTargetLineInfo() sample code for javax.sound.sampled.Mixer.getTargetLineInfo() definition code for javax.sound.sampled.Mixer.getTargetLineInfo() , Mixer.getLine(Line.Info) sample code for javax.sound.sampled.Mixer.getLine(javax.sound.sampled.Line.Info) definition code for javax.sound.sampled.Mixer.getLine(javax.sound.sampled.Line.Info) , Mixer.getSourceLineInfo(Line.Info) sample code for javax.sound.sampled.Mixer.getSourceLineInfo(javax.sound.sampled.Line.Info) definition code for javax.sound.sampled.Mixer.getSourceLineInfo(javax.sound.sampled.Line.Info) , Mixer.getTargetLineInfo(Line.Info) sample code for javax.sound.sampled.Mixer.getSourceLineInfo(javax.sound.sampled.Line.Info) definition code for javax.sound.sampled.Mixer.getSourceLineInfo(javax.sound.sampled.Line.Info) , Mixer.isLineSupported(Line.Info) sample code for javax.sound.sampled.Mixer.isLineSupported(javax.sound.sampled.Line.Info) definition code for javax.sound.sampled.Mixer.isLineSupported(javax.sound.sampled.Line.Info) , AudioSystem.getLine(Line.Info) sample code for javax.sound.sampled.AudioSystem.getLine(javax.sound.sampled.Line.Info) definition code for javax.sound.sampled.AudioSystem.getLine(javax.sound.sampled.Line.Info) , AudioSystem.getSourceLineInfo(Line.Info) sample code for javax.sound.sampled.AudioSystem.getSourceLineInfo(javax.sound.sampled.Line.Info) definition code for javax.sound.sampled.AudioSystem.getSourceLineInfo(javax.sound.sampled.Line.Info) , AudioSystem.getTargetLineInfo(Line.Info) sample code for javax.sound.sampled.AudioSystem.getTargetLineInfo(javax.sound.sampled.Line.Info) definition code for javax.sound.sampled.AudioSystem.getTargetLineInfo(javax.sound.sampled.Line.Info) , AudioSystem.isLineSupported(Line.Info) sample code for javax.sound.sampled.AudioSystem.isLineSupported(javax.sound.sampled.Line.Info) definition code for javax.sound.sampled.AudioSystem.isLineSupported(javax.sound.sampled.Line.Info)

Constructor Summary
Line.Info sample code for javax.sound.sampled.Line.Info.Line.Info(java.lang.Class) definition code for javax.sound.sampled.Line.Info.Line.Info(java.lang.Class) (Class sample code for java.lang.Class definition code for java.lang.Class <?> lineClass)
          Constructs an info object that describes a line of the specified class.
 
Method Summary
 Class sample code for java.lang.Class definition code for java.lang.Class <?> getLineClass sample code for javax.sound.sampled.Line.Info.getLineClass() definition code for javax.sound.sampled.Line.Info.getLineClass() ()
          Obtains the class of the line that this Line.Info object describes.
 boolean matches sample code for javax.sound.sampled.Line.Info.matches(javax.sound.sampled.Line.Info) definition code for javax.sound.sampled.Line.Info.matches(javax.sound.sampled.Line.Info) (Line.Info sample code for javax.sound.sampled.Line.Info definition code for javax.sound.sampled.Line.Info  info)
          Indicates whether the specified info object matches this one.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.sound.sampled.Line.Info.toString() definition code for javax.sound.sampled.Line.Info.toString() ()
          Obtains a textual description of the line info.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

Line.Info sample code for javax.sound.sampled.Line.Info(java.lang.Class<?>) definition code for javax.sound.sampled.Line.Info(java.lang.Class<?>)

public Line.Info(Class sample code for java.lang.Class definition code for java.lang.Class <?> lineClass)
Constructs an info object that describes a line of the specified class. This constructor is typically used by an application to describe a desired line.

Parameters:
lineClass - the class of the line that the new Line.Info object describes
Method Detail

getLineClass sample code for javax.sound.sampled.Line.Info.getLineClass() definition code for javax.sound.sampled.Line.Info.getLineClass()

public Class sample code for java.lang.Class definition code for java.lang.Class <?> getLineClass()
Obtains the class of the line that this Line.Info object describes.

Returns:
the described line's class

matches sample code for javax.sound.sampled.Line.Info.matches(javax.sound.sampled.Line.Info) definition code for javax.sound.sampled.Line.Info.matches(javax.sound.sampled.Line.Info)

public boolean matches(Line.Info sample code for javax.sound.sampled.Line.Info definition code for javax.sound.sampled.Line.Info  info)
Indicates whether the specified info object matches this one. To match, the specified object must be identical to or a special case of this one. The specified info object must be either an instance of the same class as this one, or an instance of a sub-type of this one. In addition, the attributes of the specified object must be compatible with the capabilities of this one. Specifically, the routing configuration for the specified info object must be compatible with that of this one. Subclasses may add other criteria to determine whether the two objects match.

Parameters:
info - the info object which is being compared to this one
Returns:
true if the specified object matches this one, false otherwise

toString sample code for javax.sound.sampled.Line.Info.toString() definition code for javax.sound.sampled.Line.Info.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Obtains a textual description of the line info.

Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a string description