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
-
FileCacheData(int)
- Constructor
-
copyData(byte)
- Copies the byte to the data buffer.
-
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
-
createData(int)
- Creates the byte array to hold the file data.
-
getInputStream()
- Converts the data buffer array to InputStream
-
getLength()
- Returns the length of the buffer.
-
skipPos(long)
- Skips a portion of buffer
FileCacheData
public FileCacheData(int len)
- Constructor
- Parameters:
- len - Length of the file. The byte array of 'len' size is created
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
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
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
skipPos
public void skipPos(long n)
- Skips a portion of buffer
getInputStream
public InputStream getInputStream()
- Converts the data buffer array to InputStream
getLength
public int getLength()
- Returns the length of the buffer.
All Packages Class Hierarchy This Package Previous Next Index