KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > java > io > BufferedInputStream

java.io
Class BufferedInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.io.BufferedInputStream
All Implemented Interfaces:
Closeable
See Also:
Top Examples, Source Code

public int available()
              throws IOException
See Also:
FilterInputStream.in
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[12]Get file attributes
By Anonymous on 2004/03/31 11:26:33  Rate
try  {  
  
  
 FileInputStream fis = new FileInputStream ( f ) ; 
  
  
 System.out.Print  ( "File - " + f.GetName (  )  + ": " ) ; 
 System.out.Print  ( " Non-blocking read " + fis.available (  )  + " bytes." ) ; 
 System.out.println (  " Total " + f.length (  )  + " bytes." ) ; 
  
  
 fis.close (  ) ; 
 fis = null; 
  
  
  }  catch  ( Exception e )   {  } 


protected volatile byte[] buf
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public BufferedInputStream(InputStream in)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[333]Open a buffered input file
By Anonymous on 2003/10/13 15:57:42  Rate
BufferedInputStream br = new BufferedInputStream ( new FileInputStream ( "Kickjava.exe" )  ) ;

[1145]Copy file
By parvez { at } collab { dot } net on 2004/12/24 03:36:20  Rate
byte [  ]  data = new byte [ 1024 ] ; 
 BufferedInputStream bis =  
 new BufferedInputStream ( new DataInputStream ( new FileInputStream ( "file" )  )  ) ; 
 BufferedOutputStream bos = new BufferedOutputStream ( new DataOutputStream ( new FileOutputStream ( "target" )  )  ) ; 
 while ( bis.read ( data )  != -1 )  
  {  
 bos.write ( data ) ; 
  }  
 bos.flush (  ) ; 
 bos.close (  ) ; 
 


public BufferedInputStream(InputStream in,
                           int size)
See Also:
IllegalArgumentException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


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


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


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


protected int marklimit
See Also:
reset(), mark(int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected int markpos
See Also:
pos, mark(int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


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


protected int pos
See Also:
buf
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int read()
         throws IOException
See Also:
FilterInputStream.in
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:
FilterInputStream.in, InputStream
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


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


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

Popular Tags