public class ServerOutputStore extends java.lang.Object implements OutputStore
Constructor and Description |
---|
ServerOutputStore(IServerObject serverObject)
Creates a new ServerOutputStore
Reads from the IMapServer object to get the service name and output directory
|
Modifier and Type | Method and Description |
---|---|
void |
delete(java.lang.String fileName)
Deletes a file from the output store
|
boolean |
exists(java.lang.String fileName) |
java.lang.String |
getServiceVirtualOutputDir() |
java.util.List |
listFiles()
List all files in the service's output directory
|
java.util.List |
listFiles(java.lang.String subDir)
List all the files in a sub-directory of a service's output directory
|
void |
read(java.lang.String fileName,
java.io.OutputStream out)
Reads the file from the Output
|
void |
write(java.lang.String fileName,
java.io.InputStream in,
long size)
Writes the input stream to the specified file.
|
public ServerOutputStore(IServerObject serverObject)
serverObject
- the services IMapServer objectpublic void write(java.lang.String fileName, java.io.InputStream in, long size) throws java.io.IOException
write
in interface OutputStore
fileName
- can contain subdirectoriesin
- the origin file as an InputStreamsize
- the size of the origin filejava.lang.IllegalArgumentException
- if any of the args is empty or nulljava.io.IOException
- if there was an error writing the input stream to the specified filepublic void read(java.lang.String fileName, java.io.OutputStream out) throws java.io.IOException
read
in interface OutputStore
fileName
- can contain subdirectoriesjava.io.IOException
- if there was an error reading the filepublic boolean exists(java.lang.String fileName)
exists
in interface OutputStore
fileName
- can contain subdirectoriesjava.lang.IllegalArgumentException
- if fileName is empty or nulljava.io.IOException
- if there was an error checking whether a file existspublic void delete(java.lang.String fileName) throws java.io.IOException
delete
in interface OutputStore
fileName
- can contain subdirectoriesjava.lang.IllegalArgumentException
- if fileName is empty or nulljava.io.IOException
- if there was an error checking whether a file existspublic java.lang.String getServiceVirtualOutputDir()
getServiceVirtualOutputDir
in interface OutputStore
java.io.IOException
- if there was an error retrieving the virtual output directorypublic java.util.List listFiles() throws java.io.IOException
listFiles
in interface OutputStore
java.io.IOException
public java.util.List listFiles(java.lang.String subDir) throws java.io.IOException
listFiles
in interface OutputStore
subDir
- - the subdirectory to list files fromjava.io.IOException