All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class spec.io.FileCacheData

spec.io.FileCacheData

public class FileCacheData
SpecJVMClient maintains the internal cache. The data is read over the network for the first run and it is cached. The cached data is used for subsequent runs The FileInputStream object contains a FileCacheData object which caches data

See Also:
FileInputStream

Constructor Index

 o FileCacheData(int)
Constructor

Method Index

 o copyData(byte)
Copies the byte to the data buffer.
 o copyData(byte[], int, int)
Copies the given specified of bytes from the given buffer from given offset to the data buffer of the FileCacheData object
 o createData(int)
Creates the byte array to hold the file data.
 o getInputStream()
Converts the data buffer array to InputStream
 o getLength()
Returns the length of the buffer.
 o skipPos(long)
Skips a portion of buffer

Constructors

 o FileCacheData
 public FileCacheData(int len)
Constructor

Parameters:
len - Length of the file. The byte array of 'len' size is created

Methods

 o createData
 public void createData(int len)
Creates the byte array to hold the file data. The size of the file is passed as argument.

Parameters:
len - Length of the file
 o copyData
 public void copyData(byte b[],
                      int off,
                      int num_bytes)
Copies the given specified of bytes from the given buffer from given offset to the data buffer of the FileCacheData object

Parameters:
b[] - 'from' byte array
off - Offset within the byte array
num_bytes - Number of bytes to be copied
 o copyData
 public void copyData(byte b)
Copies the byte to the data buffer. Increments the number of bytes field

Parameters:
b - byte to be copied
 o skipPos
 public void skipPos(long n)
Skips a portion of buffer

 o getInputStream
 public InputStream getInputStream()
Converts the data buffer array to InputStream

 o getLength
 public int getLength()
Returns the length of the buffer.


All Packages  Class Hierarchy  This Package  Previous  Next  Index