|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--au.edu.swin.synergy.lib.BFile
Encapsulates a file(s) which may be sent accross the network. File name(s) are passed through to the constructor which then opens and compresses to allow minimal tramit delay over network. When this class is received on the other end it is to be decompressed in working directory.
Field Summary | |
static int |
kDefaultCompressionRate
|
static int |
kMaxCompressionRate
|
static int |
kMinCompressionRate
|
Constructor Summary | |
BFile(File[] fileGroup,
int compressionRate)
Constructor which registers files to be compressed at a specified rate. |
|
BFile(File file,
int compressionRate)
Constructor which registers the file to be compressed at a specified rate. |
Method Summary | |
boolean |
compress()
Compresses file(s) specified when this object was created. |
boolean |
createZipFile(String fName)
Mainly for testing purposes will write whatever is contained in our buffer to file of users choice. |
boolean |
expand()
Expands file(s) registered with this class to working directory. |
boolean |
expand(File f)
Expands file(s) registered with this class into directory of users choice. |
String |
getFileName()
If only one file has been compressed, return it's file name. |
BStringList |
getFileNames()
Returns file names of all file compressed in this object. |
boolean |
multipleFiles()
Signifies whether multiple files have been compressed. |
void |
setCompressionRate(int rate)
Sets the rate at which file(s) are to be compressed. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int kMinCompressionRate
public static final int kMaxCompressionRate
public static final int kDefaultCompressionRate
Constructor Detail |
public BFile(File file, int compressionRate)
fileName
- Name of file to be compressedcompressionRate
- Rate at which file is to be compressed.
Please complete the missing tags for BFilepublic BFile(File[] fileGroup, int compressionRate)
fileGroup
- Group of files to be compressedcompressionRate
- Rate at which file is to be compressed.Method Detail |
public BStringList getFileNames()
public String getFileName()
public void setCompressionRate(int rate)
rate
- User specified compression rate.public boolean multipleFiles()
public boolean compress()
public boolean createZipFile(String fName)
fName
- Name of file compressed data is written topublic boolean expand()
public boolean expand(File f)
f
- File path to save file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |