Save This Page
Home » openjdk-7 » com.sun.media » sound » [javadoc | source]
com.sun.media.sound
abstract class: SunFileReader [javadoc | source]
java.lang.Object
   javax.sound.sampled.spi.AudioFileReader
      com.sun.media.sound.SunFileReader

Direct Known Subclasses:
    WaveFileReader, AiffFileReader, AuFileReader

Abstract File Reader class.
Field Summary
protected static final  int bisBufferSize     
Constructor:
 public SunFileReader() 
Method from com.sun.media.sound.SunFileReader Summary:
big2little,   big2littleShort,   calculatePCMFrameSize,   getAudioFileFormat,   getAudioFileFormat,   getAudioFileFormat,   getAudioInputStream,   getAudioInputStream,   getAudioInputStream,   rllong,   rlshort
Methods from javax.sound.sampled.spi.AudioFileReader:
getAudioFileFormat,   getAudioFileFormat,   getAudioFileFormat,   getAudioInputStream,   getAudioInputStream,   getAudioInputStream
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.media.sound.SunFileReader Detail:
 protected int big2little(int i) 
    big2little Protected helper method to swap the order of bytes in a 32 bit int
 protected short big2littleShort(short i) 
    big2little Protected helper method to swap the order of bytes in a 16 bit short
 protected static int calculatePCMFrameSize(int sampleSizeInBits,
    int channels) 
    Calculates the frame size for PCM frames. Note that this method is appropriate for non-packed samples. For instance, 12 bit, 2 channels will return 4 bytes, not 3.
 abstract public AudioFileFormat getAudioFileFormat(InputStream stream) throws UnsupportedAudioFileException, IOException
    Obtains the audio file format of the input stream provided. The stream must point to valid audio file data. In general, audio file providers may need to read some data from the stream before determining whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support this, this method may fail with an IOException.
 abstract public AudioFileFormat getAudioFileFormat(URL url) throws UnsupportedAudioFileException, IOException
    Obtains the audio file format of the URL provided. The URL must point to valid audio file data.
 abstract public AudioFileFormat getAudioFileFormat(File file) throws UnsupportedAudioFileException, IOException
    Obtains the audio file format of the File provided. The File must point to valid audio file data.
 abstract public AudioInputStream getAudioInputStream(InputStream stream) throws UnsupportedAudioFileException, IOException
    Obtains an audio stream from the input stream provided. The stream must point to valid audio file data. In general, audio file providers may need to read some data from the stream before determining whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support this, this method may fail with an IOException.
 abstract public AudioInputStream getAudioInputStream(URL url) throws UnsupportedAudioFileException, IOException
    Obtains an audio stream from the URL provided. The URL must point to valid audio file data.
 abstract public AudioInputStream getAudioInputStream(File file) throws UnsupportedAudioFileException, IOException
    Obtains an audio stream from the File provided. The File must point to valid audio file data.
 protected int rllong(DataInputStream dis) throws IOException 
    rllong Protected helper method to read 64 bits and changing the order of each bytes.
 protected short rlshort(DataInputStream dis) throws IOException 
    rlshort Protected helper method to read 16 bits value. Swap high with low byte.