reset password
Author Message
victormejia
Posts: 40
Posted 15:27 Oct 14, 2010 |

I'm a little confused as to how to combine the code in the FileUploadHandler.java and the write() method in the File CSNS class.  Once I get the FileItem, am I supposed to feed in the item.getInputStream() to the write() method in the File class?


Also, I am using baseDir to store the full pathname of the file. Should I use it to just store the parent folder name?


Regarding getDiskFile(), why always return a new instance of a java.io.File?
 

any help is appreciated

cysun
Posts: 2935
Posted 16:09 Oct 14, 2010 |

The CSNS File class is supposed to give you some ideas if you take the virtual file/folder approach. You are not supposed to use the class verbatim in this homework, and if you think it's confusing, don't use it at all.