Class FilteredSoundStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class FilteredSoundStream
    extends java.io.FilterInputStream
    The FilteredSoundStream class is a FilterInputStream that applies a SoundFilter to the underlying input stream.
    See Also:
    SoundFilter
    • Constructor Summary

      Constructors 
      Constructor Description
      FilteredSoundStream​(javax.sound.sampled.AudioInputStream in, SoundFilter soundFilter)
      Creates a new FilteredSoundStream object with the specified InputStream and SoundFilter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int read​(byte[] samples, int offset, int length)
      Overrides the FilterInputStream method to apply this filter whenever bytes are read
      • Methods inherited from class java.io.FilterInputStream

        available, close, mark, markSupported, read, read, reset, skip
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FilteredSoundStream

        public FilteredSoundStream​(javax.sound.sampled.AudioInputStream in,
                                   SoundFilter soundFilter)
        Creates a new FilteredSoundStream object with the specified InputStream and SoundFilter.
        Parameters:
        in - the file sound stream
        soundFilter - the sound filter
    • Method Detail

      • read

        public int read​(byte[] samples,
                        int offset,
                        int length)
                 throws java.io.IOException
        Overrides the FilterInputStream method to apply this filter whenever bytes are read
        Overrides:
        read in class java.io.FilterInputStream
        Parameters:
        samples - the samples
        offset - the offset
        length - the length of sample
        Returns:
        the byte read
        Throws:
        java.io.IOException - the IOException