Class DiskInputStream

java.lang.Object
  |
  +--DiskInputStream

public class DiskInputStream
extends java.lang.Object


Constructor Summary
DiskInputStream(java.lang.String file)
           
 
Method Summary
 void close()
          closes the file
 int getSize()
           
 byte[] readBytes(int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiskInputStream

public DiskInputStream(java.lang.String file)
Parameters:
String - file The file to open
Method Detail

readBytes

public byte[] readBytes(int length)
Parameters:
int - length The number of bytes to be read from the file
Returns:
contains the bytes read from the file. If the file is too short the rest of the array is filled with zero.

getSize

public int getSize()
Returns:
the size of the file in bytes

close

public void close()
closes the file