|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object speedscheduler.io.BinaryScheduleIO
public class 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 |
getDefaultMaxDownloadSpeed()
|
int |
getDefaultMaxUploadSpeed()
|
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 |
saveDefaultSpeeds(int defaultMaxUploadSpeed,
int defaultMaxDownloadSpeed)
|
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 getDefaultMaxUploadSpeed()
getDefaultMaxUploadSpeed
in interface ScheduleIO
ScheduleIO.getDefaultMaxUploadSpeed()
public int getDefaultMaxDownloadSpeed()
getDefaultMaxDownloadSpeed
in interface ScheduleIO
ScheduleIO.getDefaultMaxDownloadSpeed()
public void saveDefaultSpeeds(int defaultMaxUploadSpeed, int defaultMaxDownloadSpeed) throws java.io.IOException
saveDefaultSpeeds
in interface ScheduleIO
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |