Package ipsk.audio

Class LimitLengthAudioInputStream

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

    public class LimitLengthAudioInputStream
    extends javax.sound.sampled.AudioInputStream
    Author:
    klausj
    • Field Summary

      • Fields inherited from class javax.sound.sampled.AudioInputStream

        format, frameLength, framePos
    • Constructor Summary

      Constructors 
      Constructor Description
      LimitLengthAudioInputStream​(javax.sound.sampled.AudioInputStream srcAudioInputStream, long maxFrameLength)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int available()  
      void close()  
      javax.sound.sampled.AudioFormat getFormat()  
      long getFrameLength()  
      void mark​(int readlimit)  
      boolean markSupported()  
      int read()  
      int read​(byte[] b)  
      int read​(byte[] b, int off, int len)  
      void reset()  
      long skip​(long n)  
      • Methods inherited from class java.io.InputStream

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

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

      • LimitLengthAudioInputStream

        public LimitLengthAudioInputStream​(javax.sound.sampled.AudioInputStream srcAudioInputStream,
                                           long maxFrameLength)
    • Method Detail

      • available

        public int available()
                      throws java.io.IOException
        Overrides:
        available in class javax.sound.sampled.AudioInputStream
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class javax.sound.sampled.AudioInputStream
        Throws:
        java.io.IOException
      • getFormat

        public javax.sound.sampled.AudioFormat getFormat()
        Overrides:
        getFormat in class javax.sound.sampled.AudioInputStream
      • getFrameLength

        public long getFrameLength()
        Overrides:
        getFrameLength in class javax.sound.sampled.AudioInputStream
      • mark

        public void mark​(int readlimit)
        Overrides:
        mark in class javax.sound.sampled.AudioInputStream
      • markSupported

        public boolean markSupported()
        Overrides:
        markSupported in class javax.sound.sampled.AudioInputStream
      • read

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class javax.sound.sampled.AudioInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class javax.sound.sampled.AudioInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b)
                 throws java.io.IOException
        Overrides:
        read in class javax.sound.sampled.AudioInputStream
        Throws:
        java.io.IOException
      • reset

        public void reset()
                   throws java.io.IOException
        Overrides:
        reset in class javax.sound.sampled.AudioInputStream
        Throws:
        java.io.IOException
      • skip

        public long skip​(long n)
                  throws java.io.IOException
        Overrides:
        skip in class javax.sound.sampled.AudioInputStream
        Throws:
        java.io.IOException