Port.Info object.
| Modifier and Type | Class and Description |
|---|---|
| public static class | Port.
The |
Port.Info class extends Line.Info with additional
information specific to ports, including the port's name and whether it
is a source or a target for its mixer. By definition, a port acts as
either a source or a target to its mixer, but not both. (Audio input
ports are sources; audio output ports are targets.)
To learn what ports are available, you can retrieve port info objects
through the getSourceLineInfo and
getTargetLineInfo methods of the
Mixer interface. Instances of the Port.Info class may
also be constructed and used to obtain lines matching the parameters
specified in the Port.Info object.
| Modifier and Type | Field and Description |
|---|---|
| public static final Port. | COMPACT_DISC
A type of port that gets audio from a CD-ROM drive. |
| public static final Port. | HEADPHONE
A type of port that sends audio to a headphone jack. |
| private final boolean | isSource
Whether this port is source or not. |
| public static final Port. | LINE_IN
A type of port that gets audio from a line-level audio input jack. |
| public static final Port. | LINE_OUT
A type of port that sends audio to a line-level audio output jack. |
| public static final Port. | MICROPHONE
A type of port that gets audio from a built-in microphone or a microphone jack. |
| private final String | name
The string that names the port. |
| public static final Port. | SPEAKER
A type of port that sends audio to a built-in speaker or a speaker jack. |
| Access | Constructor and Description |
|---|---|
| public | Info(Class<?>
the class of the port described by the info object lineClass, String the string that names the port name, boolean true if the port is a source port (such as a
microphone), false if the port is a target port (such
as a speaker)Constructs a port's info object from the information given. |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | Returns: true if the specified object is equal to this info
object; false otherwisethe reference object with which to compare obj)Overrides java. Indicates whether the specified object is equal to this info object,
returning |
| public String | |
| public final int | Returns: a hash code value for this info objectOverrides java. Returns a hash code value for this info object. |
| public boolean | Returns: true if the port is a source port (such as a
microphone), false if the port is a target port (such
as a speaker)Indicates whether the port is a source or a target for its mixer. |
| public boolean | Returns: true if the specified object matches this one,
false otherwisethe info object for which the match is queried infoOverrides javax. Indicates whether this info object specified matches this one. |
| public final String | Returns: a string representation of the info objectOverrides javax. Returns a string representation of the info object. |
| COMPACT_DISC | back to summary |
|---|---|
| public static final Port. A type of port that gets audio from a CD-ROM drive. | |
| HEADPHONE | back to summary |
|---|---|
| public static final Port. A type of port that sends audio to a headphone jack. | |
| isSource | back to summary |
|---|---|
| private final boolean isSource Whether this port is source or not. | |
| LINE_IN | back to summary |
|---|---|
| public static final Port. A type of port that gets audio from a line-level audio input jack. | |
| LINE_OUT | back to summary |
|---|---|
| public static final Port. A type of port that sends audio to a line-level audio output jack. | |
| MICROPHONE | back to summary |
|---|---|
| public static final Port. A type of port that gets audio from a built-in microphone or a microphone jack. | |
| name | back to summary |
|---|---|
| private final String name The string that names the port. | |
| SPEAKER | back to summary |
|---|---|
| public static final Port. A type of port that sends audio to a built-in speaker or a speaker jack. | |
| Info | back to summary |
|---|---|
| public Info(Class<?> lineClass, String name, boolean isSource) Constructs a port's info object from the information given. This constructor is typically used by an implementation of Java Sound to describe a supported line. | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object obj) Overrides java. Indicates whether the specified object is equal to this info object,
returning | |
| getName | back to summary |
|---|---|
| public String getName() Obtains the name of the port.
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Returns a hash code value for this info object.
| |
| isSource | back to summary |
|---|---|
| public boolean isSource() Indicates whether the port is a source or a target for its mixer.
| |
| matches | back to summary |
|---|---|
| public boolean matches(Line. Overrides javax. Indicates whether this info object specified matches this one. To match, the match requirements of the superclass must be met and the types must be equal. | |
| toString | back to summary |
|---|---|
| public final String toString() Overrides javax. Returns a string representation of the info object. | |