|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object speedscheduler.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 ScheduleIO
schedulesToSave
- defaultMaxUploadRate
- defaultMaxDownloadRate
-
java.io.IOException
public void loadSchedules() throws java.io.IOException
loadSchedules
in interface ScheduleIO
java.io.IOException
private java.lang.String getSaveFileName()
public int getDefaultMaxUploadRate()
getDefaultMaxUploadRate
in interface ScheduleIO
ScheduleIO.getDefaultMaxUploadRate()
public int getDefaultMaxDownloadRate()
getDefaultMaxDownloadRate
in interface ScheduleIO
ScheduleIO.getDefaultMaxDownloadRate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |