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
-
count
- The number of valid components in the vector.
-
data
- The array buffer into which the components of this object are
stored.
-
fileName
-
-
FakeFile(String)
- Create a new FakeFile.
-
getInputStream()
- Gets an InputStream for this fake file.
-
getName()
- Returns the name of the file represented by this object.
-
getSize()
- Get the data size of this fake file
-
trimToSize()
- Trims the capacity of this object to be this object's current
size.
-
write(byte[], int, int)
- Writes
len bytes from the specified byte array
starting at offset off to this fake file.
fileName
protected String fileName
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.
count
protected int count
- The number of valid components in the vector.
FakeFile
public FakeFile(String fileName)
- Create a new FakeFile.
- Parameters:
- name - the file name.
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.
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.
getSize
public synchronized int getSize()
- Get the data size of this fake file
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.
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