public final class SharedFile extends AbstractSharedItem<SharedDirectory>
PATH_SEPARATOR, ROOT_PATH| Constructor and Description |
|---|
SharedFile(SharedConnection sharedConnection,
String pathName)
Create a new shared file based on the shared connection and the path name.
|
| 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.
|
getDiskShare, getName, getParentPath, getPath, getRootPath, getServerName, getSharedConnection, getShareName, getSmbPath, isDirectory, isExisting, isFile, isRootPathpublic SharedFile(SharedConnection sharedConnection, String pathName)
sharedConnection - Shared connectionpathName - 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.