Package com.collabnet.ce.soap60.webservices.filestorage

# Class SimpleFileStorageAppSoapStub

java.lang.Object
com.collabnet.ce.soap60.webservices.ClientSoapStub
com.collabnet.ce.soap60.webservices.filestorage.SimpleFileStorageAppSoapStub

All Implemented Interfaces:
  `ISimpleFileStorageAppSoap`

public class SimpleFileStorageAppSoapStub extends ClientSoapStub implements ISimpleFileStorageAppSoap

- ## Field Summary

  ### Fields inherited from class com.collabnet.ce.soap60.webservices.ClientSoapStub

  `DEFAULT_CLIENT_TIME_OUT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimpleFileStorageAppSoapStub(String soapServerUrl)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `endFileUpload(String sessionId, String fileStorageId)`
  Closes and saves uploaded file.
  `long`
  `getSize(String sessionId, String fileStorageId)`
  Returns size of the specified temporary storage file in bytes.
  `byte[]`
  `read(String sessionId, String fileStorageId, int offset, int length)`
  Reads from file a specified a number of bytes from the offset specified.
  `byte[]`
  `read2(String sessionId, String fileStorageId, long offset, int length)`
  Reads from file a specified a number of bytes from the offset specified.
  `String`
  `startFileUpload(String sessionId)`
  Opens a new file descriptor for uploading and returns the temporary storage id.
  `void`
  `write(String sessionId, String fileStorageId, byte[] data)`
  Appends data to the file being uploaded.

  ### Methods inherited from class com.collabnet.ce.soap60.webservices.ClientSoapStub

  `getServiceCall, getSoapServer, getTimeout, setTimeout, soapParam`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SimpleFileStorageAppSoapStub

    public SimpleFileStorageAppSoapStub(String soapServerUrl)

- ## Method Details

  - ### startFileUpload

    public String startFileUpload(String sessionId) throws RemoteException
    Description copied from interface: `ISimpleFileStorageAppSoap`
    Opens a new file descriptor for uploading and returns the temporary storage id.
    Specified by:
      `startFileUpload` in interface `ISimpleFileStorageAppSoap`
    Parameters:
      `sessionId` - User session id.
    Returns:
      File storage id.
    Throws:
      `RemoteException`

  - ### write

    public void write(String sessionId, String fileStorageId, byte[] data) throws RemoteException
    Description copied from interface: `ISimpleFileStorageAppSoap`
    Appends data to the file being uploaded.
    Specified by:
      `write` in interface `ISimpleFileStorageAppSoap`
    Parameters:
      `sessionId` - User session id.
      `fileStorageId` - Id of temporary file storage for the file being uploaded.
      `data` - Data to be uploaded.
    Throws:
      `RemoteException`

  - ### endFileUpload

    public void endFileUpload(String sessionId, String fileStorageId) throws RemoteException
    Description copied from interface: `ISimpleFileStorageAppSoap`
    Closes and saves uploaded file.
    Specified by:
      `endFileUpload` in interface `ISimpleFileStorageAppSoap`
    Parameters:
      `sessionId` - User session id.
      `fileStorageId` - Id of temporary file storage for the file to finish uploading.
    Throws:
      `RemoteException`

  - ### getSize

    public long getSize(String sessionId, String fileStorageId) throws RemoteException
    Description copied from interface: `ISimpleFileStorageAppSoap`
    Returns size of the specified temporary storage file in bytes.
    Specified by:
      `getSize` in interface `ISimpleFileStorageAppSoap`
    Parameters:
      `sessionId` - User session id.
      `fileStorageId` - Id of temporary file storage.
    Returns:
      File size in number of bytes.
    Throws:
      `RemoteException`

  - ### read

    public byte[] read(String sessionId, String fileStorageId, int offset, int length) throws RemoteException
    Description copied from interface: `ISimpleFileStorageAppSoap`
    Reads from file a specified a number of bytes from the offset specified.
    Specified by:
      `read` in interface `ISimpleFileStorageAppSoap`
    Parameters:
      `sessionId` - User session id.
      `fileStorageId` - Id of temporary file storage
      `offset` - Offset within file from where to read.
      `length` - Number of bytes to read.
    Returns:
      Data read from the file as a byte array. Returns null on file end.
    Throws:
      `RemoteException`

  - ### read2

    public byte[] read2(String sessionId, String fileStorageId, long offset, int length) throws RemoteException
    Description copied from interface: `ISimpleFileStorageAppSoap`
    Reads from file a specified a number of bytes from the offset specified.
    Specified by:
      `read2` in interface `ISimpleFileStorageAppSoap`
    Parameters:
      `sessionId` - User session id.
      `fileStorageId` - Id of temporary file storage
      `offset` - Offset within file from where to read (long).
      `length` - Number of bytes to read.
    Returns:
      Data read from the file as a byte array. Returns null on file end.
    Throws:
      `RemoteException`