aicas logo Jamaica 3.4 release 8

javax.sound.sampled
Class DataLine.Info

java.lang.Object
  extended by javax.sound.sampled.Line.Info
      extended by javax.sound.sampled.DataLine.Info
Enclosing interface:
DataLine

public static class DataLine.Info
extends Line.Info

This class extends Line.Info with information specific to DataLine. In particular it adds information about buffer sizes, and about supported audio formats.

Since:
1.3

Constructor Summary
DataLine.Info(Class klass, AudioFormat fmt)
          Create a new Info given the line's class and a supported audio format.
DataLine.Info(Class klass, AudioFormat[] fmts, int minSize, int maxSize)
          Create a new Info given the line's class, the supported audio formats, the minimum buffer size, and the maximum buffer size.
DataLine.Info(Class klass, AudioFormat fmt, int size)
          Create a new Info given the line's class, a supported audio format, and a buffer size.
 
Method Summary
 AudioFormat[] getFormats()
          Return the supported audio formats.
 int getMaxBufferSize()
          Return the maximum buffer size.
 int getMinBufferSize()
          Return the minimum buffer size.
 boolean isFormatSupported(AudioFormat fmt)
          Return true if the indicated audio format is supported by this Info, false otherwise.
 boolean matches(Line.Info o)
          Return true if this Info matches another Info object.
 String toString()
          Return a description of this Info object.
 
Methods inherited from class javax.sound.sampled.Line.Info
getLineClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataLine.Info

public DataLine.Info(Class klass,
                     AudioFormat fmt)
Create a new Info given the line's class and a supported audio format. The buffer sizes default to AudioSystem.NOT_SPECIFIED.

Parameters:
klass - the class of the line
fmt - the supported format

DataLine.Info

public DataLine.Info(Class klass,
                     AudioFormat[] fmts,
                     int minSize,
                     int maxSize)
Create a new Info given the line's class, the supported audio formats, the minimum buffer size, and the maximum buffer size.

Parameters:
klass - the class of the linee
fmts - the supported audio formats
minSize - the minimum buffer size
maxSize - the maximum buffer size

DataLine.Info

public DataLine.Info(Class klass,
                     AudioFormat fmt,
                     int size)
Create a new Info given the line's class, a supported audio format, and a buffer size. Both the minimum and maximum sizes are set from this size.

Parameters:
klass - the class of the line
fmt - the supported format
size - the buffer size
Method Detail

getFormats

public AudioFormat[] getFormats()
Return the supported audio formats.


getMaxBufferSize

public int getMaxBufferSize()
Return the maximum buffer size.


getMinBufferSize

public int getMinBufferSize()
Return the minimum buffer size.


isFormatSupported

public boolean isFormatSupported(AudioFormat fmt)
Return true if the indicated audio format is supported by this Info, false otherwise.

Parameters:
fmt - the audio format
Returns:
true if the format is supported

matches

public boolean matches(Line.Info o)
Return true if this Info matches another Info object.

Overrides:
matches in class Line.Info
Parameters:
o - the object to match
Returns:
true if they match, false otherwise

toString

public String toString()
Return a description of this Info object.

Overrides:
toString in class Line.Info
Returns:
a string identifying this object.

aicas logo Jamaica 3.4 release 8

aicas GmbH, Karlsruhe - Germany    www.aicas.com
Copyright 2001-2009 aicas GmbH. All Rights Reserved.