Port.Info
object.
update()
method is called with a LineEvent
object
that describes the change.CLOSE
event is dispatched
to the line's listeners.Line.Info
object describing this
line.OPEN
event is dispatched
to the line's listeners.
Note that some lines, once closed, cannot be reopened. Attempts
to reopen such a line will always result in an LineUnavailableException
.
Some types of lines have configurable properties that may affect
resource allocation. For example, a DataLine
must
be opened with a particular format and buffer size. Such lines
should provide a mechanism for configuring these properties, such
as an additional open
method or methods which allow
an application to specify the desired settings.
This method takes no arguments, and opens the line with the current
settings. For SourceDataLine
and
TargetDataLine
objects, this means that the line is
opened with default settings. For a Clip
, however,
the buffer size is determined when data is loaded. Since this method does not
allow the application to specify any data to load, an IllegalArgumentException
is thrown. Therefore, you should instead use one of the open
methods
provided in the Clip
interface to load data into the Clip
.
For DataLine
's, if the DataLine.Info
object which was used to retrieve the line, specifies at least
one fully qualified audio format, the last one will be used
as the default format.