|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object palmed.buffer.RecordBuffer
public final class RecordBuffer
This class provides an adapter between records and buffers.
Constructor Summary | |
---|---|
RecordBuffer(IRecordFactory factory,
ITextBox textBox)
Create a record 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. |
void |
persist()
Save the record. |
void |
readReference(java.io.InputStream stream)
Read from an input stream. |
void |
restore()
Load the record. |
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. |
void |
writeReference(java.io.OutputStream stream)
Write to an output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RecordBuffer(IRecordFactory factory, ITextBox textBox)
factory
- the record factorytextBox
- the text boxMethod 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 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 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 persist()
persist
in interface IRecord
public void restore()
restore
in interface IRecord
public void delete()
delete
in interface IBuffer
delete
in interface IRecord
public void readReference(java.io.InputStream stream) throws java.io.IOException
readReference
in interface IRecordBuffer
stream
- the stream to read from
java.io.IOException
- an io exception occurspublic void writeReference(java.io.OutputStream stream) throws java.io.IOException
writeReference
in interface IRecordBuffer
stream
- the stream to write to
java.io.IOException
- an io exception occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |