public static class DataLine.Info extends Line.Info
DataLine.Info还提供了特定于数据行的附加信息。 
       此信息包括: 
       Line.Info知道类其描述了线,一个DataLine.Info对象可以描述DataLine子接口,如SourceDataLineTargetDataLineClipDataLine.Info作为参数的方法,如Mixer.getLine(Line.Info)Line.Info 
       | Constructor and Description | 
|---|
| Info(类<?> lineClass, AudioFormat format)
              根据指定的信息构建数据行的信息对象,其中包含单个音频格式。 
             | 
| Info(类<?> lineClass, AudioFormat[] formats, int minBufferSize, int maxBufferSize)
              根据指定的信息构建数据行的信息对象,其中包括一组支持的音频格式和缓冲区大小的范围。 
             | 
| Info(类<?> lineClass, AudioFormat format, int bufferSize)
              从指定的信息构建数据行的信息对象,其中包含单个音频格式和所需的缓冲区大小。 
             | 
| Modifier and Type | Method and Description | 
|---|---|
| AudioFormat[] | getFormats()
              获取数据线支持的一组音频格式。 
             | 
| int | getMaxBufferSize()
              获取数据线支持的最大缓冲区大小。 
             | 
| int | getMinBufferSize()
              获取数据线支持的最小缓冲区大小。 
             | 
| boolean | isFormatSupported(AudioFormat format)
              指示此数据线是否支持特定的音频格式。 
             | 
| boolean | matches(Line.Info info)
              确定指定的信息对象是否与此匹配。 
             | 
| String | toString()
              获取数据行信息的文本描述。 
             | 
getLineClasspublic Info(类<?> lineClass, AudioFormat[] formats, int minBufferSize, int maxBufferSize)
lineClass - 由info对象描述的数据行的类 
           formats - 支持的格式集 
           minBufferSize - 数据线支持的最小缓冲区大小(以字节为单位) 
           maxBufferSize - 数据线支持的最大缓冲区大小(以字节为单位) 
           public Info(类<?> lineClass, AudioFormat format, int bufferSize)
lineClass - 由info对象描述的数据行的类 
           format - 所需格式 
           bufferSize - 所需的缓冲区大小(以字节为单位) 
           public Info(类<?> lineClass, AudioFormat format)
lineClass - 由info对象描述的数据行的类 
           format - 所需格式 
           public AudioFormat[] getFormats()
isFormatSupported(AudioFormat)可能返回true为从返回的集中缺少某些附加格式getFormats() 。 
           相反的情况并非如此: isFormatSupported(AudioFormat)保证返回true通过返回的所有格式getFormats() 。 
           如果该字段不适用于格式,或者如果格式支持该字段的宽范围值,则AudioFormat实例中的某些字段可以设置为NOT_SPECIFIED 。 
           例如,支持多达64个通道的多通道设备可以将此方法返回的AudioFormat实例中的通道字段设置为NOT_SPECIFIED 。 
          isFormatSupported(AudioFormat) 
           public boolean isFormatSupported(AudioFormat format)
true 。 
          format - 查询支持的音频格式。 
           true如果格式支持,否则 
            false 
           getFormats() , 
            AudioFormat.matches(javax.sound.sampled.AudioFormat) 
           public int getMinBufferSize()
AudioSystem.NOT_SPECIFIED 
           public int getMaxBufferSize()
AudioSystem.NOT_SPECIFIED 
           public boolean matches(Line.Info info)
 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, 2014, Oracle and/or its affiliates. All rights reserved.