|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface File
The File interface represents an open file descriptor for reads/writes on a physical file. Errors result in an SagaIOException, not a POSIX error code.
Field Summary |
---|
Fields inherited from interface org.ogf.saga.SagaObject |
---|
NO_WAIT, WAIT_FOREVER |
Method Summary | |
---|---|
long |
getSize()
Returns the number of bytes in the file. |
Task<File,Long> |
getSize(TaskMode mode)
Creates a task that obtains the number of bytes in the file. |
List<String> |
modesE()
Lists the extended modes available in this implementation and/or on the server side. |
Task<File,List<String>> |
modesE(TaskMode mode)
Creates a task that lists the extended modes available in this implementation and/or on the server side. |
int |
read(Buffer buffer)
Reads up to the buffer's size from the file into the buffer. |
int |
read(Buffer buffer,
int len)
Reads up to len bytes from the file into the buffer. |
int |
read(Buffer buffer,
int offset,
int len)
Reads up to len bytes from the file into the buffer, at
the specified offset . |
Task<File,Integer> |
read(TaskMode mode,
Buffer buffer)
Creates a task that reads up to the buffer's size bytes from the file into the buffer. |
Task<File,Integer> |
read(TaskMode mode,
Buffer buffer,
int len)
Creates a task that reads up to len bytes from the file
into the buffer. |
Task<File,Integer> |
read(TaskMode mode,
Buffer buffer,
int offset,
int len)
Creates a task that reads up to len bytes from the file
into the buffer at the specified buffer offset . |
int |
readE(String emode,
String spec,
Buffer buffer)
Extended read. |
Task<File,Integer> |
readE(TaskMode mode,
String emode,
String spec,
Buffer buffer)
Creates a task for an extended read. |
int |
readP(String pattern,
Buffer buffer)
Pattern-based read. |
Task<File,Integer> |
readP(TaskMode mode,
String pattern,
Buffer buffer)
Creates a task that does a pattern-based read. |
void |
readV(IOVec[] iovecs)
Gather/scatter read. |
Task<File,Void> |
readV(TaskMode mode,
IOVec[] iovecs)
Creates a task that does a gather/scatter read. |
long |
seek(long offset,
SeekMode whence)
Repositions the current file position as requested. |
Task<File,Long> |
seek(TaskMode mode,
long offset,
SeekMode whence)
Creates a task that repositions the current file position as requested. |
int |
sizeE(String emode,
String spec)
Determines the storage size required for an extended I/O operation. |
Task<File,Integer> |
sizeE(TaskMode mode,
String emode,
String spec)
Creates a task that determines the storage size required for an extended I/O operation. |
int |
sizeP(String pattern)
Determines the storage size required for a pattern I/O operation. |
Task<File,Integer> |
sizeP(TaskMode mode,
String pattern)
Creates a task that determines the storage size required for a pattern I/O operation. |
int |
write(Buffer buffer)
Writes up to the buffer's size bytes from the buffer to the file at the current file position. |
int |
write(Buffer buffer,
int len)
Writes up to len bytes from the buffer to the file at the
current file position. |
int |
write(Buffer buffer,
int offset,
int len)
Writes up to len bytes from the buffer at the specified
buffer offset to the file at the current file position. |
Task<File,Integer> |
write(TaskMode mode,
Buffer buffer)
Creates a task that writes up to the buffer's size bytes from the buffer to the file at the current file position. |
Task<File,Integer> |
write(TaskMode mode,
Buffer buffer,
int len)
Creates a task that writes up to len bytes from the buffer
to the file at the current file position. |
Task<File,Integer> |
write(TaskMode mode,
Buffer buffer,
int offset,
int len)
Creates a task that writes up to len bytes from the buffer
at the specified buffer offset to the file at the current
file position. |
int |
writeE(String emode,
String spec,
Buffer buffer)
Extended write. |
Task<File,Integer> |
writeE(TaskMode mode,
String emode,
String spec,
Buffer buffer)
Creates a task for an extended write. |
int |
writeP(String pattern,
Buffer buffer)
Pattern-based write. |
Task<File,Integer> |
writeP(TaskMode mode,
String pattern,
Buffer buffer)
Creates a task that does a pattern-based write. |
void |
writeV(IOVec[] iovecs)
Gather/scatter write. |
Task<File,Void> |
writeV(TaskMode mode,
IOVec[] iovecs)
Creates a task that does a gather/scatter write. |
Methods inherited from interface org.ogf.saga.namespace.NSEntry |
---|
close, close, close, close, copy, copy, copy, copy, getCWD, getCWD, getMTime, getMTime, getName, getName, getURL, getURL, isDir, isDir, isEntry, isEntry, isLink, isLink, link, link, link, link, move, move, move, move, permissionsAllow, permissionsAllow, permissionsDeny, permissionsDeny, readLink, readLink, remove, remove, remove, remove |
Methods inherited from interface org.ogf.saga.SagaObject |
---|
clone, getId, getSession |
Methods inherited from interface org.ogf.saga.permissions.Permissions |
---|
getGroup, getGroup, getOwner, getOwner, permissionsAllow, permissionsAllow, permissionsCheck, permissionsCheck, permissionsDeny, permissionsDeny |
Method Detail |
---|
long getSize() throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, IncorrectStateException, TimeoutException, NoSuccessException
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
IncorrectStateException
- is thrown when the Directory is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.int read(Buffer buffer, int len) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, BadParameterException, IncorrectStateException, TimeoutException, NoSuccessException, SagaIOException
len
bytes from the file into the buffer.
Returns the number of bytes read, or 0 at end-of-file. Note: this call is
blocking. The async version can be used to implement non-blocking reads.
buffer
- the buffer to read data into.len
- the number of bytes to be read.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully, or if the file was opened WriteOnly.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
BadParameterException
- is thrown if the provided buffer is not large enough to hold
the required length.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.
SagaIOException
- is thrown on read failures when the SAGA specifications say that
a POSIX error number should be returned (which does not really
make sense for Java).int read(Buffer buffer, int offset, int len) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, BadParameterException, IncorrectStateException, TimeoutException, NoSuccessException, SagaIOException
len
bytes from the file into the buffer, at
the specified offset
. Returns the number of bytes read,
or 0 at end-of-file. Note: this call is blocking. The async version can
be used to implement non-blocking reads.
buffer
- the buffer to read data into.offset
- the offset in the buffer.len
- the number of bytes to be read.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully, or if the file was opened WriteOnly.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
BadParameterException
- is thrown if the provided buffer is not large enough to hold
the required length.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.
SagaIOException
- is thrown on read failures when the SAGA specifications say that
a POSIX error number should be returned (which does not really
make sense for Java).int read(Buffer buffer) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, BadParameterException, IncorrectStateException, TimeoutException, NoSuccessException, SagaIOException
buffer
- the buffer to read data into.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully, or if the file was opened WriteOnly.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
BadParameterException
- is thrown if the provided buffer is not large enough to hold
the required length.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.
SagaIOException
- is thrown on read failures when the SAGA specifications say that
a POSIX error number should be returned (which does not really
make sense for Java).int write(Buffer buffer, int offset, int len) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, BadParameterException, IncorrectStateException, TimeoutException, NoSuccessException, SagaIOException
len
bytes from the buffer at the specified
buffer offset
to the file at the current file position.
Returns the number of bytes written.
buffer
- the buffer to write data from.offset
- the buffer offset.len
- the number of bytes to be written.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully, or if the file was opened ReadOnly.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
BadParameterException
- is thrown if the provided buffer is not large enough to hold
the specified length.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.
SagaIOException
- is thrown on write failures when the SAGA specifications say that
a POSIX error number should be returned (which does not really
make sense for Java).int write(Buffer buffer, int len) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, BadParameterException, IncorrectStateException, TimeoutException, NoSuccessException, SagaIOException
len
bytes from the buffer to the file at the
current file position. Returns the number of bytes written.
buffer
- the buffer to write data from.len
- the number of bytes to be written.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully, or if the file was opened ReadOnly.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
BadParameterException
- is thrown if the provided buffer is not large enough to hold
the specified length.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.
SagaIOException
- is thrown on write failures when the SAGA specifications say that
a POSIX error number should be returned (which does not really
make sense for Java).int write(Buffer buffer) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, BadParameterException, IncorrectStateException, TimeoutException, NoSuccessException, SagaIOException
buffer
- the buffer to write data from.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully, or if the file was opened ReadOnly.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
BadParameterException
- is thrown if the provided buffer is not large enough to hold
the specified length.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.
SagaIOException
- is thrown on write failures when the SAGA specifications say that
a POSIX error number should be returned (which does not really
make sense for Java).long seek(long offset, SeekMode whence) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, IncorrectStateException, TimeoutException, NoSuccessException, SagaIOException
offset
- offset in bytes to move pointer.whence
- determines from where the offset is relative.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.
SagaIOException
- is thrown on seek failures when the SAGA specifications say that
a POSIX error number should be returned (which does not really
make sense for Java).void readV(IOVec[] iovecs) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, BadParameterException, IncorrectStateException, TimeoutException, NoSuccessException, SagaIOException
iovecs
- array of IOVecs determining how much to read and where to
store it.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully, or if the file was opened WriteOnly.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
BadParameterException
- is thrown if the provided buffer is not large enough to hold
the required length.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.
SagaIOException
- is thrown on read failures when the SAGA specifications say that
a POSIX error number should be returned (which does not really
make sense for Java).void writeV(IOVec[] iovecs) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, BadParameterException, IncorrectStateException, TimeoutException, NoSuccessException, SagaIOException
iovecs
- array of IOVecs determining how much to write and where to
obtain the data from.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully, or if the file was opened ReadOnly.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
BadParameterException
- is thrown if the provided buffer is not large enough to hold
the specified length.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.
SagaIOException
- is thrown on write failures when the SAGA specifications say that
a POSIX error number should be returned (which does not really
make sense for Java).int sizeP(String pattern) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, IncorrectStateException, PermissionDeniedException, BadParameterException, TimeoutException, NoSuccessException
pattern
- to determine size for.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
BadParameterException
- is thrown when the pattern cannot be parsed.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.int readP(String pattern, Buffer buffer) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, BadParameterException, IncorrectStateException, TimeoutException, NoSuccessException, SagaIOException
pattern
- specification for the read operation.buffer
- to store data into.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully, or if the file was opened WriteOnly.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
BadParameterException
- is thrown when the pattern cannot be parsed.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.
SagaIOException
- is thrown on read failures when the SAGA specifications say that
a POSIX error number should be returned (which does not really
make sense for Java).int writeP(String pattern, Buffer buffer) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, BadParameterException, IncorrectStateException, TimeoutException, NoSuccessException, SagaIOException
pattern
- specification for the write operation.buffer
- to be written.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully, or if the file was opened ReadOnly.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
BadParameterException
- is thrown when the pattern cannot be parsed.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.
SagaIOException
- is thrown on write failures when the SAGA specifications say that
a POSIX error number should be returned (which does not really
make sense for Java).List<String> modesE() throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, IncorrectStateException, TimeoutException, NoSuccessException
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.int sizeE(String emode, String spec) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, IncorrectStateException, PermissionDeniedException, BadParameterException, TimeoutException, NoSuccessException
emode
- extended mode to use.spec
- to determine size for.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
BadParameterException
- is thrown when the emode is not supported or the spec cannot
be parsed.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.int readE(String emode, String spec, Buffer buffer) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, BadParameterException, IncorrectStateException, TimeoutException, NoSuccessException, SagaIOException
emode
- extended mode to use.spec
- specification of read operation.buffer
- to store the data read.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully, or if the file was opened WriteOnly.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
BadParameterException
- is thrown when the emode is not supported or the spec cannot
be parsed.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.
SagaIOException
- is thrown on read failures when the SAGA specifications say that
a POSIX error number should be returned (which does not really
make sense for Java).int writeE(String emode, String spec, Buffer buffer) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, BadParameterException, IncorrectStateException, TimeoutException, NoSuccessException, SagaIOException
emode
- extended mode to use.spec
- specification of write operation.buffer
- data to write.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully, or if the file was opened ReadOnly.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
BadParameterException
- is thrown when the emode is not supported or the spec cannot
be parsed.
IncorrectStateException
- is thrown when the File is already closed.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.
SagaIOException
- is thrown on write failures when the SAGA specifications say that
a POSIX error number should be returned (which does not really
make sense for Java).Task<File,Long> getSize(TaskMode mode) throws NotImplementedException
mode
- the task mode.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,Integer> read(TaskMode mode, Buffer buffer, int offset, int len) throws NotImplementedException
len
bytes from the file
into the buffer at the specified buffer offset
. The
number returned by the task is the number of bytes read, or 0 at
end-of-file.
mode
- the task mode.offset
- the buffer offset.len
- the number of bytes to be read.buffer
- the buffer to read data into.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,Integer> read(TaskMode mode, Buffer buffer, int len) throws NotImplementedException
len
bytes from the file
into the buffer. The number returned by the task is the number of bytes
read, or 0 at end-of-file.
mode
- the task mode.len
- the number of bytes to be read.buffer
- the buffer to read data into.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,Integer> read(TaskMode mode, Buffer buffer) throws NotImplementedException
mode
- the task mode.buffer
- the buffer to read data into.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,Integer> write(TaskMode mode, Buffer buffer, int offset, int len) throws NotImplementedException
len
bytes from the buffer
at the specified buffer offset
to the file at the current
file position. The number returned by the task is the number of bytes
written.
mode
- the task mode.offset
- the buffer offset.len
- the number of bytes to be written.buffer
- the buffer to write data from.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,Integer> write(TaskMode mode, Buffer buffer, int len) throws NotImplementedException
len
bytes from the buffer
to the file at the current file position. The number returned by the task
is the number of bytes written.
mode
- the task mode.len
- the number of bytes to be written.buffer
- the buffer to write data from.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,Integer> write(TaskMode mode, Buffer buffer) throws NotImplementedException
mode
- the task mode.buffer
- the buffer to write data from.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,Long> seek(TaskMode mode, long offset, SeekMode whence) throws NotImplementedException
mode
- the task mode.offset
- offset in bytes to move pointer.whence
- determines from where the offset is relative.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,Void> readV(TaskMode mode, IOVec[] iovecs) throws NotImplementedException
mode
- the task mode.iovecs
- array of IOVecs determining how much to read and where to
store it.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,Void> writeV(TaskMode mode, IOVec[] iovecs) throws NotImplementedException
mode
- the task mode.iovecs
- array of IOVecs determining how much to write and where to
obtain the data from.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,Integer> sizeP(TaskMode mode, String pattern) throws NotImplementedException
mode
- the task mode.pattern
- to determine size for.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,Integer> readP(TaskMode mode, String pattern, Buffer buffer) throws NotImplementedException
mode
- the task mode.pattern
- specification for the read operation.buffer
- to store data into.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,Integer> writeP(TaskMode mode, String pattern, Buffer buffer) throws NotImplementedException
mode
- the task mode.pattern
- specification for the write operation.buffer
- to be written.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,List<String>> modesE(TaskMode mode) throws NotImplementedException
mode
- the task mode.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,Integer> sizeE(TaskMode mode, String emode, String spec) throws NotImplementedException
mode
- the task mode.emode
- extended mode to use.spec
- to determine size for.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,Integer> readE(TaskMode mode, String emode, String spec, Buffer buffer) throws NotImplementedException
mode
- the task mode.emode
- extended mode to use.spec
- specification of read operation.buffer
- to store the data read.
NotImplementedException
- is thrown when the task version of this method is not
implemented.Task<File,Integer> writeE(TaskMode mode, String emode, String spec, Buffer buffer) throws NotImplementedException
mode
- the task mode.emode
- extended mode to use.spec
- specification of write operation.buffer
- data to write.
NotImplementedException
- is thrown when the task version of this method is not
implemented.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |