|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.wurbelizer.HeapFile
public class HeapFile
Utility class implementing in-memory files. Nice for here-documents that don't need to be stored on disk. Important: heapfiles are valid among all wurblets and sourcefiles within a single ant run.
| Constructor Summary | |
|---|---|
HeapFile(String name)
Creates an empty heapfile. |
|
HeapFile(String name,
String text)
Creates a heapfile. |
|
| Method Summary | |
|---|---|
static boolean |
delete(String name)
Removes a heapfile. |
static HeapFile |
get(String name)
Gets the heapfile of a given name. |
int |
getInvocationCount()
Gets the last invocationCounter from wurbler-container (for optional use in wurblets). |
String |
getName()
Gets the name of the heapfile. |
PrintStream |
getPrintStream()
Get the print stream to print into the heapfile. |
Reader |
getReader()
Gets a reader for the contents. |
String |
getText()
Gets the contents of a heapfile. |
void |
reset()
Resets (empties) the heapfile. |
void |
setInvocationCount(int invocationCount)
Sets the last invocation count. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HeapFile(String name,
String text)
throws IOException
name - the unique name of the heapfiletext - the initial contents, null = empty.
IOException - if the file already exists
public HeapFile(String name)
throws IOException
name - the unique name of the heapfile
IOException - if the file already exists| Method Detail |
|---|
public void reset()
public String getText()
public String getName()
public Reader getReader()
public PrintStream getPrintStream()
public int getInvocationCount()
public void setInvocationCount(int invocationCount)
invocationCount - the invocation count.public static HeapFile get(String name)
name - the name of the heapfile.
public static boolean delete(String name)
name - the of heapfile
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||