/* File Name: FileHandleVO.java */ package explorer.client; import java.io.IOException; import java.io.FileOutputStream; import java.io.FileNotFoundException; /** * FileHandleVo generates Value Objects that is used to get and set the * values of the no of bytes moved during a copy operation, get the total * size of the file. */ public class FileHandleVO extends java.io.FileOutputStream { private int totalBytes = 0; private int copiedBytes = 0; private String strFile; public FileHandleVO(String file, int size) throws FileNotFoundException { super(file); totalBytes = size; strFile = file; } public String getFilePath() { return strFile; } public void setFilePath(String strFile) { this.strFile = strFile; } public int getSize() { return totalBytes; } public void setCopiedBytes(int readBytes) { copiedBytes += readBytes; } public int getCopiedBytes() { return copiedBytes; } public int getRemainingBytes() throws IOException { return totalBytes - copiedBytes; } }