Interface AudioOverlay

  • All Known Implementing Classes:
    MP3SequenceOverlay, MP3ShuffleOverlay

    public interface AudioOverlay
    The implementing classes should be able to returns data bytes of an audio file independent from their order in the file.
    Author:
    Richard Rudek
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int available()
      Returns the number of bytes that are available to modify and have not been returned by next().
      byte[] getBytes()
      Returns the byte array this object holds.
      byte next()
      Returns the next modifiable byte.
      void setByte​(byte value)
      Sets the current byte to the given value.
    • Method Detail

      • next

        byte next()
           throws java.util.NoSuchElementException
        Returns the next modifiable byte.
        Returns:
        byte - the next modifiable byte
        Throws:
        java.util.NoSuchElementException - if there are no more modifiable bytes
      • available

        int available()
        Returns the number of bytes that are available to modify and have not been returned by next().
        Returns:
        number of available bytes
      • setByte

        void setByte​(byte value)
              throws java.util.NoSuchElementException
        Sets the current byte to the given value.
        Parameters:
        value - the value to set the current byte to
        Throws:
        java.util.NoSuchElementException - if setByte() is called before the first call to next(), or if setByte() is called after a call to next() produced a NoSuchElementException
      • getBytes

        byte[] getBytes()
        Returns the byte array this object holds.
        Returns:
        byte array held by this object