Let the server names the remote file with a unique name (those methods which do not have a String parameter).ĭespite somewhat intricate of the storeXXX() methods, there are only two methods which are mostly used in practice, they are:īesides the storeXXX() methods, there are also two other ones need to be invoked before and after a file transfer:.Name the remote file explicitly (those methods which accept a String parameter called remote).The two ways above can be used in combination with: This can be useful if we want to show progress of the upload, by calculating how many bytes are transferred over total bytes needed. This type of methods is needed when we want to control how the bytes are transferred, by writing our own code for reading bytes from the local file and write these bytes to the remote file through the OutputStream object. Store files by writing to an OutputStream of the connection (those methods which return an OutputStream).This type of methods can be used when we don’t care how the bytes are transferred from the local file to the remote one, just let the system done the ins and outs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |