net.sf.basedb.ws.client
Class FileClient
java.lang.Object
net.sf.basedb.ws.client.AbstractRPCClient
net.sf.basedb.ws.client.FileClient
public class FileClient
- extends AbstractRPCClient
Web service client for files in BASE.
Calls services in FileService
- Since:
- 3.0
- Author:
- Nicklas
Constructor Summary |
FileClient(SessionClient session)
Creates new ProjectClient object for an active session client. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
session
private final SessionClient session
FileClient
public FileClient(SessionClient session)
- Creates new ProjectClient object for an active session client.
- Parameters:
session
- The active session client
getById
public FileInfo getById(int itemId)
throws org.apache.axis2.AxisFault
- Get info about a file when you know the ID.
- Parameters:
itemId
- The ID of the file
- Returns:
- An FileInfo object
- Throws:
org.apache.axis2.AxisFault
- If communication with web service fails.
download
public InputStream download(int fileId)
throws org.apache.axis2.AxisFault,
IOException
- Download a file when you know the id.
- Parameters:
fileId
- Id of file to download
- Returns:
- An InputStream to read the file data from, or null
if the file has no data
- Throws:
org.apache.axis2.AxisFault
- If communication with webservices fails.
IOException
- If writing to the target file fails.