Class WindowsRemoteFile
- java.lang.Object
-
- com.sun.enterprise.util.cluster.windows.io.WindowsRemoteFile
-
public final class WindowsRemoteFile extends Object
- Author:
- Byron Nevins
-
-
Constructor Summary
Constructors Constructor Description WindowsRemoteFile(WindowsRemoteFile parent, String path)WindowsRemoteFile(WindowsRemoteFileSystem wrfs, String path)WindowsRemoteFile(WindowsCredentials bonafides, String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyFrom(BufferedInputStream sin)Copies from sin to this WindowsRemoteFilevoidcopyFrom(File from, RemoteFileCopyProgress progress)voidcopyFrom(String from)voidcopyFrom(Collection<String> from)voidcopyTo(WindowsRemoteFile wf)voidcopyTo(File file)Copy the remote Windows file to the given FilevoidcopyTo(File file, RemoteFileCopyProgress progress)Copy the remote Windows file to the given FilevoidcreateNewFile()voiddelete()booleanexists()THis returns 3 states: 1.StringgetPath()String[]list()voidmkdirs()voidmkdirs(boolean force)voidsetLastModified(long when)
-
-
-
Constructor Detail
-
WindowsRemoteFile
public WindowsRemoteFile(WindowsRemoteFile parent, String path) throws WindowsException
- Throws:
WindowsException
-
WindowsRemoteFile
public WindowsRemoteFile(WindowsCredentials bonafides, String path) throws WindowsException
- Throws:
WindowsException
-
WindowsRemoteFile
public WindowsRemoteFile(WindowsRemoteFileSystem wrfs, String path) throws WindowsException
- Throws:
WindowsException
-
-
Method Detail
-
exists
public final boolean exists() throws WindowsExceptionTHis returns 3 states: 1. FIle system can't be accessed or found 2. it exists 3. it doesn't exist- Returns:
- Throws:
WindowsException
-
list
public final String[] list() throws WindowsException
- Throws:
WindowsException
-
createNewFile
public final void createNewFile() throws WindowsException- Throws:
WindowsException
-
copyTo
public final void copyTo(WindowsRemoteFile wf) throws WindowsException
- Throws:
WindowsException
-
copyTo
public final void copyTo(File file) throws WindowsException
Copy the remote Windows file to the given File- Parameters:
f- The File that will be created or overwritten with the contents of this Windows Remote File.- Throws:
WindowsException- Since:
- 3.1.2
-
copyTo
public final void copyTo(File file, RemoteFileCopyProgress progress) throws WindowsException
Copy the remote Windows file to the given File- Parameters:
f- The File that will be created or overwritten with the contents of this Windows Remote File.progress- The optional callback object that gets called for each chunk of data that gets copied over the wire. Setting it to null is OK.- Throws:
WindowsException- Since:
- 3.1.2
-
delete
public final void delete() throws WindowsException- Throws:
WindowsException
-
mkdirs
public final void mkdirs() throws WindowsException- Throws:
WindowsException
-
mkdirs
public final void mkdirs(boolean force) throws WindowsException- Throws:
WindowsException
-
copyFrom
public final void copyFrom(BufferedInputStream sin) throws WindowsException
Copies from sin to this WindowsRemoteFile- Parameters:
sin- the opened stream. It will automatically be closed here.- Throws:
WindowsException- if any errors.
-
copyFrom
public final void copyFrom(File from, RemoteFileCopyProgress progress) throws WindowsException
- Throws:
WindowsException
-
copyFrom
public final void copyFrom(Collection<String> from) throws WindowsException
- Throws:
WindowsException
-
copyFrom
public final void copyFrom(String from) throws WindowsException
- Throws:
WindowsException
-
setLastModified
public final void setLastModified(long when) throws WindowsException- Throws:
WindowsException
-
getPath
public final String getPath()
-
-