Package tv.hd3g.transfertfiles.local
Class LocalFile
- All Implemented Interfaces:
AbstractFile
-
Field Summary
Fields inherited from class tv.hd3g.transfertfiles.CommonAbstractFile
fileSystem, path -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyAbstractToLocal(File localFile, TransfertObserver observer) voiddelete()Not recursive.longdownloadAbstract(OutputStream outputStream, int bufferSize, SizedStoppableCopyCallback copyCallback) Only use with a regular file.booleanexists()booleanbooleanisFile()booleanisHidden()booleanisLink()booleanlonglonglength()list()voidmkdir()voidsendLocalToAbstract(File localFile, TransfertObserver observer) longuploadAbstract(InputStream inputStream, int bufferSize, SizedStoppableCopyCallback copyCallback) Only use with a regular file.Methods inherited from class tv.hd3g.transfertfiles.CommonAbstractFile
equals, getFileSystem, getName, getParent, getPath, hashCode, observableCopyStream, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface tv.hd3g.transfertfiles.AbstractFile
copyAbstractToAbstract, copyAbstractToAbstract, renameTo, toCache, toCachedList
-
Method Details
-
getInternalFile
-
copyAbstractToLocal
-
sendLocalToAbstract
-
downloadAbstract
public long downloadAbstract(OutputStream outputStream, int bufferSize, SizedStoppableCopyCallback copyCallback) Description copied from interface:AbstractFileOnly use with a regular file. Type will not be checked before copy action. Never forget to call outputStream.close after download.bufferSize- can be used on internal stream transfert, but it's not mandated.- Returns:
- data size readed from this
-
uploadAbstract
public long uploadAbstract(InputStream inputStream, int bufferSize, SizedStoppableCopyCallback copyCallback) Description copied from interface:AbstractFileOnly use with a regular file. Type will not be checked before copy action.bufferSize- can be used on internal stream transfert, but it's not mandated.- Returns:
- data size writer to this
-
length
public long length() -
exists
public boolean exists() -
delete
public void delete()Description copied from interface:AbstractFileNot recursive. -
isDirectory
public boolean isDirectory() -
isFile
public boolean isFile() -
isLink
public boolean isLink() -
isSpecial
public boolean isSpecial() -
isHidden
public boolean isHidden()- Specified by:
isHiddenin interfaceAbstractFile- Overrides:
isHiddenin classCommonAbstractFile<LocalFileSystem>- Returns:
- marked "hidden" or is a dotfile
-
lastModified
public long lastModified() -
list
-
mkdir
public void mkdir() -
renameTo
- Returns:
- moved file
-