Class SoundDataStream

java.lang.Object
java.io.InputStream
de.mrjulsen.dragnsounds.core.data.SoundDataStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class SoundDataStream extends InputStream
  • Constructor Details

    • SoundDataStream

      public SoundDataStream(int initialSize, long soundId)
  • Method Details

    • read

      public int read() throws IOException
      Specified by:
      read in class InputStream
      Throws:
      IOException
    • getSoundId

      public long getSoundId()
    • hasSpace

      public boolean hasSpace(int length)
    • willHaveSpace

      public boolean willHaveSpace(int length)
    • remainingSpaceAfterRequest

      public int remainingSpaceAfterRequest()
    • remainingSpace

      public int remainingSpace()
    • filledSpaceAfterRequest

      public int filledSpaceAfterRequest()
    • filledSpace

      public int filledSpace()
    • totalSpace

      public int totalSpace()
    • currentlyNeeded

      public int currentlyNeeded()
    • isPacketNeeded

      public boolean isPacketNeeded(int packetIndex)
    • canRequestData

      public boolean canRequestData()
    • shouldReject

      public boolean shouldReject(int packetIndex)
    • read

      public int read(byte[] b, int off, int len) throws IOException
      Overrides:
      read in class InputStream
      Throws:
      IOException
    • read

      public int read(byte[] data)
      Overrides:
      read in class InputStream
    • queue

      public void queue(SoundDataPacket packet)
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class InputStream
      Throws:
      IOException