Uses of Interface javax.sound.sampled.TargetDataLine (Java Platform SE 8 )
Date: 2026-04-24

## Uses of Interface
javax.sound.sampled.TargetDataLine

- Packages that use TargetDataLine
  Package | Description
  --- | ---
  javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.

- - ### Uses of TargetDataLine in javax.sound.sampled

    Methods in javax.sound.sampled that return TargetDataLine
    Modifier and Type | Method and Description
    --- | ---
    `static TargetDataLine` | AudioSystem.`getTargetDataLine(AudioFormat format)` Obtains a target data line that can be used for recording audio data in the format specified by the `AudioFormat` object.
    `static TargetDataLine` | AudioSystem.`getTargetDataLine(AudioFormat format, Mixer.Info mixerinfo)` Obtains a target data line that can be used for recording audio data in the format specified by the `AudioFormat` object, provided by the mixer specified by the `Mixer.Info` object.

    Constructors in javax.sound.sampled with parameters of type TargetDataLine
    Constructor and Description
    `AudioInputStream(TargetDataLine line)` Constructs an audio input stream that reads its data from the target data line indicated.

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.