All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.css.util.FakeFile

java.lang.Object
   |
   +----org.w3c.css.util.FakeFile

public class FakeFile
extends Object

Variable Index

 o count
The number of valid components in the vector.
 o data
The array buffer into which the components of this object are stored.
 o fileName

Constructor Index

 o FakeFile(String)
Create a new FakeFile.

Method Index

 o getInputStream()
Gets an InputStream for this fake file.
 o getName()
Returns the name of the file represented by this object.
 o getSize()
Get the data size of this fake file
 o trimToSize()
Trims the capacity of this object to be this object's current size.
 o write(byte[], int, int)
Writes len bytes from the specified byte array starting at offset off to this fake file.

Variables

 o fileName
 protected String fileName
 o data
 protected byte data[]
The array buffer into which the components of this object are stored. The capacity of this object is the length of this array buffer.

 o count
 protected int count
The number of valid components in the vector.

Constructors

 o FakeFile
 public FakeFile(String fileName)
Create a new FakeFile.

Parameters:
name - the file name.

Methods

 o getName
 public String getName()
Returns the name of the file represented by this object.

Returns:
the name of the file represented by this File object.
 o getInputStream
 public synchronized InputStream getInputStream() throws IOException
Gets an InputStream for this fake file.

Returns:
the input stream of this fake file or null if no data are available.
 o getSize
 public synchronized int getSize()
Get the data size of this fake file

 o trimToSize
 public final synchronized void trimToSize()
Trims the capacity of this object to be this object's current size. An application can use this operation to minimize the storage of a fake file.

 o write
 public void write(byte data[],
                   int start,
                   int len)
Writes len bytes from the specified byte array starting at offset off to this fake file.

Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
Throws: IOException
if an I/O error occurs.

All Packages  Class Hierarchy  This Package  Previous  Next  Index