|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpalmed.buffer.Buffer
public final class Buffer
This class implements an association between a text box content and a file.
Constructor Summary | |
---|---|
Buffer(ITextBox textBox)
Create an empty buffer. |
Method Summary | |
---|---|
void |
delete()
Delete the buffer. |
boolean |
hasBeenModified()
Test if the buffer has been modified. |
boolean |
hasFile(IFile file)
Test if the given file is handled by the buffer. |
void |
marshall(java.io.OutputStream stream)
Write to an output stream. |
void |
open(IFile file)
Open the given file. |
boolean |
save()
Save the file. |
void |
save(IFile file)
Save into the given file. |
void |
unmarshall(java.io.InputStream stream)
Read from an input stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Buffer(ITextBox textBox)
textBox
- the text box.Method Detail |
---|
public void open(IFile file)
open
in interface IBuffer
file
- the file to read frompublic boolean save()
This operation must fail if no file is associated to the buffer.
save
in interface IBuffer
public void save(IFile file)
save
in interface IBuffer
file
- the file to write intopublic boolean hasBeenModified()
hasBeenModified
in interface IBuffer
public boolean hasFile(IFile file)
hasFile
in interface IBuffer
file
- the file
public void marshall(java.io.OutputStream stream) throws java.io.IOException
marshall
in interface ISerializable
stream
- the stream to write to
java.io.IOException
- an io exception occurspublic void unmarshall(java.io.InputStream stream) throws java.io.IOException
unmarshall
in interface ISerializable
stream
- the stream to read from
java.io.IOException
- an io exception occurspublic void delete()
delete
in interface IBuffer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |