KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > javax > sound > sampled > AudioInputStream

javax.sound.sampled
Class AudioInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by javax.sound.sampled.AudioInputStream
All Implemented Interfaces:
Closeable
See Also:
Top Examples, Source Code, AudioSystem, Clip.open(AudioInputStream)

public AudioInputStream(InputStream stream,
                        AudioFormat format,
                        long length)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1941]how to delete a record in file using java
By vallam_sowmya { at } yahoo { dot } co { dot } in on 2007/11/13 05:11:13  Rate
import java.io.*; 
 //import javax.servlet.*; 
 //import javax.servlet.http.*; 
  
  
  
  
 class  Delline  
  {  
    public static void main ( String [  ]  args )  throws Exception 
    {  
 //PrintWriter out=res.getWriter (  ) ; 
 //res.setContentType ( "text/html" ) ; 
  
  
  
     try 
  {  
 File f = new File ( "c:/sowmya/view/myfile1.txt" ) ; 
 BufferedReader br = new BufferedReader ( new FileReader ( f )  ) ; 
 String line=new String (  ) ; 
 String empID ="1"; 
 FileInputStream fis=null; 
 FileOutputStream ois=null; 
 StringBuffer buffer=null; 
 //String empID=&empID; 
 //PrintWriter out = new PrintWriter ( "c:/sowmya/view/myfile2.txt" ) ; 
 //System.out.println ( "c:/sowmya/flatform/myfile2.txt" ) ; 
 while (   ( line=br.readLine (  )  ) !=null  )  
  {  
   if ( line.equals ( empID )  )  
          {   
          skip ( 'String' ) ; 
    }  
   else 
          {  
 // buffer = new StringBuffer (  ) ; 
  //buffer.append  ( "line" ) ; 
 //String s = buffer.toString (  ) ; 
   //System.out.println  ( s ) ; 
 // 
    System.out.println ( line ) ;    
          }  
      fis= new FileInputStream ( "c:/sowmya/view/myfile1.txt" ) ; 
          ois= new FileOutputStream ( "c:/sowmya/view/myfile2.txt" ) ; 
     int x= fis.read (  ) ; 
     while ( x!=-1 )  
    {  
        ois.write ( x ) ; 
        x=fis.read (  ) ; 
    }  
  }  
 ois.close (  ) ; 
 fis.close (  ) ; 
 System.out.println ( "file copied sucessfully" ) ; 
  }  
 catch ( Exception e )  
    {  
   e.printStackTrace (  ) ; }  
  
  
  
  
  
    }  
  } 


public AudioInputStream(TargetDataLine line)
See Also:
AudioSystem.NOT_SPECIFIED
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int available()
              throws IOException
See Also:
skip(long), read(), read(byte[]), read(byte[], int, int), InputStream
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void close()
           throws IOException
See Also:
InputStream, Closeable
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected AudioFormat format
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected long frameLength
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[43]Calculate the # of bytes in an audio sample
By andiri { at } loewenstern { dot } mailshell { dot } com on 2002/09/18 15:16:44  Rate
Calculate the # of bytes in an audio sample: 
 long numBytes ( AudioInputStream ais )   {  
 return ais.getFrameLength (  ) *ais.getFormat (  ) .getFrameSize (  ) ; 
  }  
 


protected long framePos
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected int frameSize
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public AudioFormat getFormat()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public long getFrameLength()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void mark(int readlimit)
See Also:
markSupported(), reset(), InputStream
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean markSupported()
See Also:
reset(), mark(int), InputStream
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int read()
         throws IOException
See Also:

, read(byte[]), read(byte[], int, int), InputStream

Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int read(byte[] b)
         throws IOException
See Also:
available(), read(), read(byte[], int, int), InputStream
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int read(byte[] b,
                int off,
                int len)
         throws IOException
See Also:
available(), skip(long), read(), read(byte[]), InputStream
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void reset()
           throws IOException
See Also:
markSupported(), mark(int), InputStream
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public long skip(long n)
          throws IOException
See Also:
available(), read(), InputStream
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags