|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FCFileBacked
This capability is supported by an EFile
:s that is backed by a
File
. It contains methods to directly access the file entity's
backing File
object.
Be careful with using this capability on file entities with other capabilities such as compression since these methods will not take them into account.
FCTFileBacked
,
FCFileBackedUtil
Method Summary | |
---|---|
FileChannel |
openFileChannelForAppend(RandomAccessFileFactory ff)
Open the file for writing and return a FileChannel . |
FileChannel |
openFileChannelForRandomAccess(RandomAccessFileFactory ff,
RandomAccessMode mode)
Open the file for random access and return a FileChannel . |
FileChannel |
openFileChannelForRead(RandomAccessFileFactory ff)
Open the file for reading and return a FileChannel . |
FileChannel |
openFileChannelForWrite(RandomAccessFileFactory ff)
Open the file for writing and return a FileChannel . |
FileOutputStream |
openFileForAppend(FileOutputStreamFactory ff)
Open the file for appending and return a FileOutputStream . |
RandomAccessFile |
openFileForRandomAccess(RandomAccessFileFactory ff,
RandomAccessMode mode)
Open the file for random access. |
FileInputStream |
openFileForRead(FileInputStreamFactory ff)
Open the file for reading and return a FileInputStream . |
FileOutputStream |
openFileForWrite(FileOutputStreamFactory ff)
Open the file for writing and return a FileOutputStream . |
Methods inherited from interface org.entityfs.fs.cap.entity.ECFileResolvable |
---|
getFileObject |
Methods inherited from interface org.entityfs.fs.cap.entity.ECUriResolvable |
---|
getUri |
Methods inherited from interface org.entityfs.cap.EntityCapability |
---|
getEntity, isValid |
Method Detail |
---|
RandomAccessFile openFileForRandomAccess(RandomAccessFileFactory ff, RandomAccessMode mode) throws ReadOnlyException, AccessDeniedException, ReadLockRequiredException, WriteLockRequiredException
ff
- A factory for the RandomAccessFile
object. This factory
decides the capabilities of the returned object.mode
- The mode for opening.
RandomAccessFile
. The caller is responsible for
closing the file.
ReadOnlyException
- If a read-only file is opened for writing.
ReadLockRequiredException
- If the file is opened with mode r
and the client does not have a read lock for the file.
WriteLockRequiredException
- If the file is opened for writing and
the client does not have a write lock for the file.
AccessDeniedException
- If the client does not have sufficient
access rights to the entity.FileOutputStream openFileForWrite(FileOutputStreamFactory ff) throws ReadOnlyException, AccessDeniedException, WriteLockRequiredException
FileOutputStream
. The
previous contents of the file will be discarded. The caller is
responsible for closing the stream.
ff
- A factory for the FileOutputStream
object. This factory
decides the capabilities of the returned stream.
FileOutputStream
.
ReadOnlyException
- If the file is read only.
WriteLockRequiredException
- If the client does not have a write
lock for the file.
AccessDeniedException
- If the client does not have write access to
the entity.FileOutputStream openFileForAppend(FileOutputStreamFactory ff) throws ReadOnlyException, AccessDeniedException, WriteLockRequiredException
FileOutputStream
. The
data written to the stream will be appended to the previous contents of
the file. The caller is responsible for closing the stream.
ff
- A factory for the FileOutputStream
object. This factory
decides the capabilities of the returned stream.
FileOutputStream
.
ReadOnlyException
- If the file is read only.
WriteLockRequiredException
- If the client does not have a write
lock for the file.
AccessDeniedException
- If the client does not have write access to
the entity.FileInputStream openFileForRead(FileInputStreamFactory ff) throws AccessDeniedException, ReadLockRequiredException
FileInputStream
. The
caller is responsible for closing the stream.
ff
- A factory for the FileInputStream
object. This factory
decides the capabilities of the returned object.
FileInputStream
.
AccessDeniedException
- If the client does not have read access to
the entity.
ReadLockRequiredException
- If the client does not have a read lock
for the file.FileChannel openFileChannelForRandomAccess(RandomAccessFileFactory ff, RandomAccessMode mode) throws ReadOnlyException, AccessDeniedException, ReadLockRequiredException, WriteLockRequiredException
FileChannel
. The
caller is responsible for closing the channel.
ff
- A factory for RandomAccessFile
objects. This factory
decides the capabilities of the returned object.mode
- The mode for opening.
FileChannel
. The caller is responsible for
closing the channel.
ReadOnlyException
- If a read-only file is opened for writing.
ReadLockRequiredException
- If the file is opened with mode r
and the client does not have a read lock for the file.
WriteLockRequiredException
- If the file is opened for writing and
the client does not have a write lock for the file.
AccessDeniedException
- If the client does not have sufficient
access rights to the entity.FileChannel openFileChannelForRead(RandomAccessFileFactory ff) throws AccessDeniedException, ReadLockRequiredException
FileChannel
. The caller is
responsible for closing the channel.
ff
- A factory for RandomAccessFile
objects. This factory
decides the capabilities of the returned channel.
FileChannel
.
AccessDeniedException
- If the client does not have read access to
the entity.
ReadLockRequiredException
- If the client does not have a read lock
for the file.FileChannel openFileChannelForWrite(RandomAccessFileFactory ff) throws ReadOnlyException, AccessDeniedException, WriteLockRequiredException
FileChannel
. The previous
contents of the file will be discarded. The caller is responsible for
closing the channel.
ff
- A factory for RandomAccessFile
objects. This factory
decides the capabilities of the returned channel.
FileChannel
.
ReadOnlyException
- If the file is read only.
WriteLockRequiredException
- If the client does not have a write
lock for the file.
AccessDeniedException
- If the client does not have write access to
the entity.FileChannel openFileChannelForAppend(RandomAccessFileFactory ff) throws ReadOnlyException, AccessDeniedException, WriteLockRequiredException
FileChannel
. Data written
to the channel will be appended to the previous contents of the file. The
caller is responsible for closing the channel.
ff
- A factory for RandomAccessFile
objects. This factory
decides the capabilities of the returned channel.
FileChannel
.
ReadOnlyException
- If the file is read only.
WriteLockRequiredException
- If the client does not have a write
lock for the file.
AccessDeniedException
- If the client does not have write access to
the entity.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |