|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectspeedscheduler.io.BinaryScheduleIO
An implementation of ScheduleIO that persists Schedules as binary serialized Java objects. TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
| Field Summary | |
protected int |
defaultMaxDownloadRate
|
protected int |
defaultMaxUploadRate
|
protected java.util.Vector |
schedules
|
protected boolean |
schedulesLoaded
|
| Constructor Summary | |
BinaryScheduleIO()
|
|
| Method Summary | |
int |
getDefaultMaxDownloadRate()
|
int |
getDefaultMaxUploadRate()
|
private java.lang.String |
getSaveFileName()
Helper function that tells us where to save the Schedules. |
java.util.Vector |
getSchedules()
Fetches the loaded schedules. |
void |
loadSchedules()
Loads the Schedules and default up/down rates from the saved file of binary Java Objects using an ObjectInputStream. |
void |
saveSchedules(java.util.Vector schedulesToSave,
int defaultMaxUploadRate,
int defaultMaxDownloadRate)
Save these Schedules and default up/down rates to the persistent file using a vector of binary Java objects and the ObjectOutputStream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Vector schedules
protected int defaultMaxUploadRate
protected int defaultMaxDownloadRate
protected boolean schedulesLoaded
| Constructor Detail |
public BinaryScheduleIO()
| Method Detail |
public java.util.Vector getSchedules()
getSchedules in interface ScheduleIO
public void saveSchedules(java.util.Vector schedulesToSave,
int defaultMaxUploadRate,
int defaultMaxDownloadRate)
throws java.io.IOException
saveSchedules in interface ScheduleIOschedulesToSave - defaultMaxUploadRate - defaultMaxDownloadRate -
java.io.IOException
public void loadSchedules()
throws java.io.IOException
loadSchedules in interface ScheduleIOjava.io.IOExceptionprivate java.lang.String getSaveFileName()
public int getDefaultMaxUploadRate()
getDefaultMaxUploadRate in interface ScheduleIOScheduleIO.getDefaultMaxUploadRate()public int getDefaultMaxDownloadRate()
getDefaultMaxDownloadRate in interface ScheduleIOScheduleIO.getDefaultMaxDownloadRate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||