public class ServerOutputStore extends java.lang.Object implements OutputStore
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SERVER_OBJECT_TYPE_IMAGESERVER |
static java.lang.String |
SERVER_OBJECT_TYPE_MAPSERVER |
| 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 |
getServicePhysicalOutputDir() |
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 static final java.lang.String SERVER_OBJECT_TYPE_MAPSERVER
public static final java.lang.String SERVER_OBJECT_TYPE_IMAGESERVER
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 OutputStorefileName - 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 OutputStorefileName - can contain subdirectoriesjava.io.IOException - if there was an error reading the filepublic boolean exists(java.lang.String fileName)
exists in interface OutputStorefileName - 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 OutputStorefileName - 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 OutputStorejava.io.IOException - if there was an error retrieving the virtual output directorypublic java.lang.String getServicePhysicalOutputDir()
getServicePhysicalOutputDir in interface OutputStorejava.io.IOException - if there was an error retrieving the virtual output directorypublic java.util.List listFiles()
throws java.io.IOException
listFiles in interface OutputStorejava.io.IOExceptionpublic java.util.List listFiles(java.lang.String subDir)
throws java.io.IOException
listFiles in interface OutputStoresubDir - - the subdirectory to list files fromjava.io.IOException