public final class SharedFile extends AbstractSharedItem<SharedDirectory>
diskShare, smbPath| Constructor and Description |
|---|
SharedFile(AbstractSharedItem abstractSharedItem,
String pathName)
Create shared file via copy constructor and a new path name.
|
SharedFile(String serverName,
String shareName,
String pathName,
com.hierynomus.smbj.auth.AuthenticationContext authenticationContext)
Create a shared file based on the server name, share name, path name and the authentication.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createFile()
Create a new file.
|
protected SharedDirectory |
createSharedNodeItem(String pathName)
Create a new shared directory via factory.
|
void |
deleteFile()
Delete the current file.
|
boolean |
equals(Object object)
Check if the current and the given objects are equals.
|
InputStream |
getInputStream()
Get the input stream of the file that can be used to download the file.
|
OutputStream |
getOutputStream()
Get the output stream of the file that can be used to upload content to this file.
|
getName, getParentPath, getPath, getRootPath, getServerName, getShareName, getSmbPath, isDirectory, isExisting, isFile, isRootPathpublic SharedFile(String serverName, String shareName, String pathName, com.hierynomus.smbj.auth.AuthenticationContext authenticationContext) throws IOException
serverName - Name of the servershareName - Name of the sharepathName - i ha Path nameauthenticationContext - Authentication for the connectionIOException - Exception in case of a problempublic SharedFile(AbstractSharedItem abstractSharedItem, String pathName)
abstractSharedItem - Shared item that will be reusedpathName - New path namepublic void createFile()
public void deleteFile()
public InputStream getInputStream()
public OutputStream getOutputStream()
public boolean equals(Object object)
equals in class AbstractSharedItem<SharedDirectory>object - Given object to compare againstprotected SharedDirectory createSharedNodeItem(String pathName)
createSharedNodeItem in class AbstractSharedItem<SharedDirectory>pathName - Path name of the shared itemCopyright © 2018. All rights reserved.