public interface _RawFileStoreOperationsNC extends _StatefulServiceInterfaceOperationsNC
Modifier and Type | Method and Description |
---|---|
void |
exists_async(AMD_RawFileStore_exists __cb)
Checks to see if a raw file exists with the file ID that
the service was initialized with.
|
void |
getFileId_async(AMD_RawFileStore_getFileId __cb)
Returns the current file id or null if none has been set.
|
void |
read_async(AMD_RawFileStore_read __cb,
long position,
int length)
Reads
length bytes of data at the
position from the raw file into an array of
bytes. |
void |
save_async(AMD_RawFileStore_save __cb)
Saves the
OriginalFile associated with
the service if it has been modified. |
void |
setFileId_async(AMD_RawFileStore_setFileId __cb,
long fileId)
This method manages the state of the service.
|
void |
size_async(AMD_RawFileStore_size __cb)
Returns the size of the file on disk (not as stored in the
database since that value will only be updated on
save . |
void |
truncate_async(AMD_RawFileStore_truncate __cb,
long length)
Limits the size of a file to the given length.
|
void |
write_async(AMD_RawFileStore_write __cb,
byte[] buf,
long position,
int length)
Writes
length bytes of data from the specified
buf byte array starting at at
position to the raw file. |
activate_async, close_async, getCurrentEventContext_async, passivate_async
void setFileId_async(AMD_RawFileStore_setFileId __cb, long fileId) throws ServerError
SecurityViolation
if for the
current user context either the file is not readable or a
omero.constants.permissions.BINARYACCESS
restriction is
in place.__cb
- The callback object for the operation.ServerError
void getFileId_async(AMD_RawFileStore_getFileId __cb) throws ServerError
__cb
- The callback object for the operation.ServerError
void read_async(AMD_RawFileStore_read __cb, long position, int length) throws ServerError
length
bytes of data at the
position
from the raw file into an array of
bytes.__cb
- The callback object for the operation.ServerError
void size_async(AMD_RawFileStore_size __cb) throws ServerError
save
. If the file has not yet been written to, and
therefore does not exist, a ResourceError
will be thrown.__cb
- The callback object for the operation.ServerError
void truncate_async(AMD_RawFileStore_truncate __cb, long length) throws ServerError
__cb
- The callback object for the operation.ServerError
void write_async(AMD_RawFileStore_write __cb, byte[] buf, long position, int length) throws ServerError
length
bytes of data from the specified
buf
byte array starting at at
position
to the raw file.__cb
- The callback object for the operation.ServerError
void exists_async(AMD_RawFileStore_exists __cb) throws ServerError
__cb
- The callback object for the operation.ResourceError
- if there is a problem accessing the
file due to permissions errors within the
repository or any other I/O error.ServerError
void save_async(AMD_RawFileStore_save __cb) throws ServerError
OriginalFile
associated with
the service if it has been modified. The returned valued
should replace all instances of the
OriginalFile
in the client.
If save has not been called, RawFileStore
instances will save the OriginalFile
object associated with it on close
.
See also ticket 1651
and ticket 2161.__cb
- The callback object for the operation.ServerError